Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mzfr/slicer
Browse files Browse the repository at this point in the history
  • Loading branch information
mzfr authored and mzfr committed Jul 9, 2020
2 parents 96b6b4e + bef8100 commit 0a89565
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release Go Binaries

on:
release:
types: [created]

env:
CMD_PATH: ./src

jobs:
releases-matrix:
name: Release Matrix
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64]
exclude:
# windows/386 and darwin/386 seems useless
- goarch: "386"
goos: windows
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v2

- name: Set APP_VERSION env
run: echo ::set-env name=APP_VERSION::$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev )
- name: Set BUILD_TIME env
run: echo ::set-env name=BUILD_TIME::$(date)
- name: Environment Printer
uses: managedkaos/print-env@v1.0

- uses: wangyoucao577/go-release-action@master
with:
github_token: ${{ secrets.TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "${{ env.CMD_PATH }}"
build_flags: -v
ldflags: -X "main.appVersion=${{ env.APP_VERSION }}" -X "main.buildTime=${{ env.BUILD_TIME }}" -X main.gitCommit=${{ github.sha }} -X main.gitRef=${{ github.ref }}

0 comments on commit 0a89565

Please sign in to comment.