v0.0.6 #11
Workflow file for this run
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
# workflow name | |
name: release | |
# on events | |
on: | |
release: | |
types: | |
- created | |
# jobs | |
jobs: | |
# generate build cross-platform build files | |
generate: | |
name: Generate cross-platform builds | |
runs-on: ubuntu-latest | |
steps: | |
# step 1: checkout repository code | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
# step 2: generate build files | |
- name: Generate build files | |
run: | | |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/surgecli-linux-amd64 -ldflags="-s -w" surgecli.go | |
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o dist/surgecli-darwin-amd64 -ldflags="-s -w" surgecli.go | |
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o dist/surgecli-windows-amd64.exe -ldflags="-s -w" surgecli.go | |
# step 3: upload build-artifacts | |
- name: Upload build-artifacts | |
uses: skx/github-action-publish-binaries@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
args: "./dist/*" |