Skip to content

Commit

Permalink
Release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
babarot committed Feb 2, 2022
1 parent 15568c8 commit 8ccc046
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
project_name: afx
env:
- GO111MODULE=on
before:
hooks:
- go mod tidy
builds:
- main: .
binary: afx
ldflags:
- -s -w
- -X github.com/b4b4r07/afx/cmd.Version={{.Version}}
- -X github.com/b4b4r07/afx/cmd.BuildTag={{.Tag}}
- -X github.com/b4b4r07/afx/cmd.BuildSHA={{.ShortCommit}}
env:
- CGO_ENABLED=0
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip
release:
prerelease: auto

0 comments on commit 8ccc046

Please sign in to comment.