Skip to content

Commit

Permalink
Merge pull request #47 from dtan4/goreleaser-action
Browse files Browse the repository at this point in the history
Use GoReleaser GitHub Action
  • Loading branch information
dtan4 authored Dec 31, 2019
2 parents 019a3d9 + 1503854 commit 509e2bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ on:
- "v*.*.*"

jobs:
release:
runs-on: ubuntu-18.04
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.12
- name: Build binaries
run: GO111MODULE=on make cross-build
- name: Build artifacts
run: make dist
- name: Release
uses: softprops/action-gh-release@v1
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
files: "dist/*.tar.gz,dist/*.zip"
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# To upload Homebrew recipe to dtan4/homebrew-tools, we need a personal token
# instead of Action's temporary token
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ archives:
format_overrides:
- goos: windows
format: zip
release:
prerelease: auto
brews:
- github:
owner: dtan4
Expand All @@ -47,3 +49,5 @@ changelog:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch

0 comments on commit 509e2bf

Please sign in to comment.