diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index eac1b28..23acc0f 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -1,24 +1,24 @@ -# workflow name -name: Generate release-artifacts - -# on events on: release: - types: - - created + types: [created] -# workflow tasks jobs: - generate: - name: Generate cross-platform builds + releases-matrix: + name: Release Go Binary runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/amd64, linux/arm64, windows/amd64, darwin/amd64, darwin/arm64 + goos: [linux, windows, darwin] + goarch: [amd64, arm64] + exclude: + - goarch: arm64 + goos: windows steps: - - name: Checkout the repository - uses: actions/checkout@v2 - - name: Generate build files - uses: thatisuday/go-cross-build@v1 + - uses: actions/checkout@v2 + - uses: wangyoucao577/go-release-action@v1.22 with: - platforms: "linux/amd64,linux/arm64, darwin/amd64, windows/amd64" - name: "switchhost" - compress: "true" - dest: "dist" + github_token: ${{ secrets.GITHUB_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + extra_files: LICENSE README.md