add release step to github action

This commit is contained in:
Qingping Hou 2020-03-02 16:16:42 -08:00
parent 1c9afe8e9a
commit 5ab065fec2
3 changed files with 35 additions and 0 deletions

View File

@ -23,3 +23,12 @@ jobs:
- name: Run test
run: make test
- name: Release
uses: goreleaser/goreleaser-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
version: v0.127.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
dist

25
.goreleaser.yml Normal file
View File

@ -0,0 +1,25 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
builds:
- env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'