ci: pin GoReleaser to the triggering tag, fix tag-collision regression
Release / release (push) Has been cancelled
Release / release (push) Has been cancelled
When v0.3.1 was tagged on the same commit as v0.3.1-rc2, the release workflow built and tried to publish rc2 artifacts instead of v0.3.1, failing with 'already_exists' on every asset upload. Root cause: goreleaser-action@v6 + 'version: latest' (locked to v2.x) falls back to 'git describe --tags' for the current tag, which picked v0.3.1-rc2 over v0.3.1 when both refs pointed at HEAD. Explicitly setting GORELEASER_CURRENT_TAG = github.ref_name forces the workflow to use the tag that triggered it, regardless of other refs at the same commit.
This commit is contained in:
@@ -61,3 +61,8 @@ jobs:
|
||||
args: release --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Force GoReleaser to use the triggering tag rather than fall
|
||||
# back to `git describe` — which can resolve to an older tag
|
||||
# (e.g., a vX.Y.Z-rc tag) when multiple tags point at the same
|
||||
# commit. Surfaced as the v0.3.1 release failure on 2026-05-24.
|
||||
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
|
||||
|
||||
Reference in New Issue
Block a user