From 6728675ae74f67f7200f5005a58151f181e03a11 Mon Sep 17 00:00:00 2001 From: Kanri Date: Wed, 9 Dec 2020 21:54:37 +0800 Subject: [PATCH] :green_heart: Satrt actions --- .github/workflows/release.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..833a80e7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +on: + release: + types: [created] + +jobs: + releases-matrix: + name: Release Go Binary + runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/386, darwin/amd64 + goos: [linux, windows, darwin] + goarch: ["386", amd64, arm] + exclude: + - goos: darwin + goarch: arm + + steps: + - uses: actions/checkout@v2 + - name: Set RELEASE_VERSION env + run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10} + - uses: wangyoucao577/go-release-action@master + env: + CGO_ENABLED: 0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + ldflags: -w -s -X "github.com/Yiwen-Chan/GroupManager.Version=${{ env.RELEASE_VERSION }}"