diff --git a/.github/workflows/build-test-deploy.yaml b/.github/workflows/build-test-deploy.yaml index f27a1b3a..e4dc6606 100644 --- a/.github/workflows/build-test-deploy.yaml +++ b/.github/workflows/build-test-deploy.yaml @@ -192,9 +192,13 @@ jobs: name: collect path: bin/collect - goreleaser-test-darwin-amd64: + goreleaser-test: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') != true + strategy: + matrix: + goarch: [amd64, arm64] + goos: [darwin, linux, windows] steps: - name: Checkout uses: actions/checkout@v3 @@ -212,123 +216,8 @@ jobs: version: "v0.183.0" args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target env: - GOARCH: amd64 - GOOS: darwin - - goreleaser-test-linux-amd64: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') != true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-go@v3 - with: - go-version: "1.19" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: "v0.183.0" - args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target - env: - GOARCH: amd64 - GOOS: linux - - goreleaser-test-windows-amd64: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') != true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-go@v3 - with: - go-version: "1.19" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: "v0.183.0" - args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target - env: - GOARCH: amd64 - GOOS: windows - - goreleaser-test-darwin-arm64: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') != true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-go@v3 - with: - go-version: "1.19" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: "v0.183.0" - args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target - env: - GOARCH: arm64 - GOOS: darwin - - goreleaser-test-linux-arm64: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') != true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-go@v3 - with: - go-version: "1.19" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: "v0.183.0" - args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target - env: - GOARCH: arm64 - GOOS: linux - - goreleaser-test-windows-arm64: - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') != true - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow - - - uses: actions/setup-go@v3 - with: - go-version: "1.19" - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v4 - with: - version: "v0.183.0" - args: build --rm-dist --snapshot --config deploy/.goreleaser.yaml --single-target - env: - GOARCH: arm64 - GOOS: windows + GOARCH: ${{ matrix.goarch }} + GOOS: ${{ matrix.goos }} goreleaser: runs-on: ubuntu-latest diff --git a/deploy/.goreleaser.yaml b/deploy/.goreleaser.yaml index 2f0193f7..224e7b58 100644 --- a/deploy/.goreleaser.yaml +++ b/deploy/.goreleaser.yaml @@ -6,7 +6,7 @@ release: builds: - id: preflight # NOTE: if you add any additional goos/goarch values, ensure you update ../.github/workflows/build-test-deploy.yaml - # with the respective goreleaser-test-* jobs + # specifically the matrix values for goreleaser-test goos: - linux - darwin