diff --git a/.github/workflows/wireguard-go.yml b/.github/workflows/wireguard-go.yml index 8549741..173428e 100644 --- a/.github/workflows/wireguard-go.yml +++ b/.github/workflows/wireguard-go.yml @@ -3,38 +3,31 @@ name: Build Wireguard-go on: workflow_dispatch: -permissions: - contents: write - jobs: - goreleaser: + releases-matrix: + name: Release Go Binary runs-on: ubuntu-latest + strategy: + matrix: + # build and publish in parallel: linux/386, linux/amd64, linux/arm64, windows/386, windows/amd64, darwin/amd64, darwin/arm64 + goos: [linux] + goarch: [amd64, arm64] + exclude: + - goarch: "386" + goos: darwin + - goarch: arm64 + goos: windows steps: - - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Fetch all tags - run: git fetch --force --tags - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.18 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - # either 'goreleaser' (default) or 'goreleaser-pro' - distribution: goreleaser - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution - # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + - uses: actions/checkout@v2 + - uses: fscarmen/go-release-action@v1.25 + with: + github_token: ${{ secrets.GH_TOKEN }} + goos: ${{ matrix.goos }} + goarch: ${{ matrix.goarch }} + goversion: "https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz" + project_path: "./cmd/test-binary" + binary_name: "test-binary" + extra_files: LICENSE README.md - name: Release Binary run: |