-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,23 @@ | ||
|
||
on: release | ||
name: Build | ||
on: | ||
release: | ||
types: [created] | ||
|
||
name: Release | ||
jobs: | ||
release-linux-amd64: | ||
name: Release linux/amd64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: compile and release | ||
uses: ngs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: linux | ||
|
||
release-darwin-amd64: | ||
name: Release darwin/amd64 | ||
release: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
goos: [linux, windows, darwin] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: compile and release | ||
uses: ngs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: darwin | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
release-windows-amd64: | ||
name: Release windows/amd64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: compile and release | ||
uses: ngs/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GOARCH: amd64 | ||
GOOS: windows | ||
- name: Release binaries | ||
uses: mcuadros/go-release-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: amd64 | ||
ldflags: -X main.commit=${{ github.sha }} -X main.version=${{ github.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,6 @@ jobs: | |
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Test | ||
run: go test ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters