Skip to content

Commit c72602c

Browse files
pmclSFclaude
andcommitted
fix(release): Goreleaser v2 invocation flags
The v0.1.2 release workflow failed with two distinct goreleaser errors: 1. `--id terrain-linux-amd64,terrain-linux-arm64` error=no builds with ids terrain-linux-amd64,terrain-linux-arm64 The goreleaser v2 `--id` flag is singular and does not accept comma-separated values. Multi-id builds need one --id per id. Reshape the matrix to expose a verbatim build_args string ("--id A --id B") that the runner passes through. 2. `release --clean --skip=publish,validate --skip-build` error=unknown flag: --skip-build Goreleaser v2 folded the standalone --skip-build into --skip, so all phases live in a single comma-separated --skip value. Verified by running v0.1.2 release workflow (run 25180906155): the verify job passed but every matrix entry failed at the goreleaser step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b87112c commit c72602c

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,27 @@ jobs:
4545
# one runner per OS family. Linux runner produces both amd64 (native) and
4646
# arm64 (cross-compiled with gcc-aarch64-linux-gnu).
4747
#
48-
# Each runner builds its own slice via goreleaser `build --id=<list>`, then
49-
# packages/signs via `release --skip-build --skip=publish,validate`. The
50-
# aggregator job below downloads all artifacts and creates a single GitHub
51-
# Release.
48+
# Each runner builds its own slice via goreleaser `build --id <each>`, then
49+
# packages/signs via `release --skip=publish,validate,build`. The aggregator
50+
# job below downloads all artifacts and creates a single GitHub Release.
5251
go-release-build:
5352
needs: verify
5453
strategy:
5554
fail-fast: false
5655
matrix:
5756
include:
57+
# build_args is the verbatim --id flag list passed to goreleaser
58+
# build. Goreleaser v2's --id is singular and does NOT accept
59+
# comma-separated values, so multi-id builds need one --id flag
60+
# per id (the linux runner produces both amd64 and arm64).
5861
- os: ubuntu-latest
59-
build_ids: terrain-linux-amd64,terrain-linux-arm64
62+
build_args: --id terrain-linux-amd64 --id terrain-linux-arm64
6063
artifact_name: terrain-linux
6164
- os: macos-latest
62-
build_ids: terrain-darwin
65+
build_args: --id terrain-darwin
6366
artifact_name: terrain-darwin
6467
- os: windows-latest
65-
build_ids: terrain-windows
68+
build_args: --id terrain-windows
6669
artifact_name: terrain-windows
6770
runs-on: ${{ matrix.os }}
6871
steps:
@@ -95,19 +98,20 @@ jobs:
9598
uses: goreleaser/goreleaser-action@v6
9699
with:
97100
version: '~> v2'
98-
args: build --clean --id ${{ matrix.build_ids }}
101+
args: build --clean ${{ matrix.build_args }}
99102
env:
100103
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101104
COSIGN_ENABLED: "1"
102105

103106
# Run goreleaser's release pipeline (archives, SBOMs, signs, checksums)
104-
# without publishing or rebuilding. The build step above already produced
105-
# binaries for this matrix entry.
107+
# without publishing or rebuilding. Goreleaser v2 folded the standalone
108+
# --skip-build flag into --skip=build, so all skip phases are listed in
109+
# one comma-separated value.
106110
- name: Package + sign artifacts
107111
uses: goreleaser/goreleaser-action@v6
108112
with:
109113
version: '~> v2'
110-
args: release --clean --skip=publish,validate --skip-build
114+
args: release --clean --skip=publish,validate,build
111115
env:
112116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113117
COSIGN_ENABLED: "1"

0 commit comments

Comments
 (0)