Skip to content

Commit 62d06c0

Browse files
committed
fix(cd): allow GoReleaser to auto-detect monorepo tags and skip semver validation
GoReleaser was failing with 'git tag v0.2.0 was not made against commit...' because: - The workflow was overriding GORELEASER_CURRENT_TAG with just the version (v0.2.0) - But the actual git tag created by release-please is the full monorepo format (protoc-gen-elixir-grpc@v0.2.0) Solution: - Remove GORELEASER_CURRENT_TAG override to let GoReleaser auto-detect the full tag name - Add --skip=validate flag to bypass semver parsing (since the tag format includes component prefix) GoReleaser correctly auto-detects the full tag and proceeds with the release when validation is skipped.
1 parent 46a7854 commit 62d06c0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ jobs:
126126
args: release --snapshot --clean --skip=publish --config .github/goreleaser.yml
127127
env:
128128
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
129-
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
130129
BUILD_COMPONENT: ${{ steps.version.outputs.component }}
131130

132131
- name: Run GoReleaser (Release)
@@ -135,10 +134,9 @@ jobs:
135134
with:
136135
distribution: goreleaser
137136
version: "~> v2"
138-
args: release --clean --config .github/goreleaser.yml
137+
args: release --clean --skip=validate --config .github/goreleaser.yml
139138
env:
140139
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141-
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }}
142140
BUILD_COMPONENT: ${{ steps.version.outputs.component }}
143141

144142
- name: Attest Build Provenance

0 commit comments

Comments
 (0)