Skip to content

fix(release): pin GoReleaser to the pushed tag - an rc on the same commit won - #54

Merged
tobert merged 1 commit into
mainfrom
fix/release-current-tag
Nov 7, 2026
Merged

tobert merged 1 commit into
mainfrom
fix/release-current-tag

Conversation

@tobert

@tobert tobert commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Sets GORELEASER_CURRENT_TAG to the pushed tag on tag runs. The binary smoke step now fails the run before the image push when otel-cli version does not match the tag.

The v0.6.0 run 42421835716 (attempt 1) released as v0.6.0-rc.2, because both tags pointed to 888e090. GoReleaser's default git tag --points-at HEAD --sort=-version:refname ranks v0.6.0-rc.2 above v0.6.0. ghcr v0.6.0 and latest got a binary that reports 0.6.0-rc.2. We deleted the rc.2 tag and re-ran the job to recover.

GoReleaser ignores an empty GORELEASER_CURRENT_TAG (getFromEnv checks tag != "" in internal/pipe/git/git.go). Dispatch snapshots therefore do not change. The snapshot cannot find this problem, because it never resolves a tag. The next tag push is the real test.

Verification

# The new check with a fake binary: it fails on the attempt 1 case and passes on a match.
binary=0.6.0-rc.2 tag=v0.6.0 exit=1
binary=0.6.0 tag=v0.6.0 exit=0
python3 -c 'import yaml; yaml.safe_load(open(".github/workflows/release.yml"))'

actionlint did not run locally. CI's goreleaser snapshot job runs this workflow's config.

🤖 Generated with Claude Code

…mmit won

Why: The v0.6.0 run 42421835716 (attempt 1) released as v0.6.0-rc.2. Both
tags were on 888e090, and GoReleaser's default `git tag --points-at HEAD
--sort=-version:refname` ranks the rc first. ghcr v0.6.0 and latest got a
binary that reports 0.6.0-rc.2.
Approach: Set GORELEASER_CURRENT_TAG to github.ref_name on tag runs. GoReleaser
ignores an empty value, so dispatch snapshots do not change. The binary smoke
step now stops the run before the image push if `version` does not match the tag.
Learned: The snapshot cannot find this, because it never resolves a tag. A
check after GoReleaser is too late for the GitHub release, but not for the image.
Next: The next tag validates it. kaibo's release.yml probably needs the same fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tobert
tobert merged commit c5881bb into main Nov 7, 2026
2 checks passed
tobert added a commit that referenced this pull request Nov 9, 2026
Why: Amy: "we'll get a 0.6.2 rolling to do an e2e". We agreed on 0.6.1,
because 0.6.0 is the last release.
Approach: Two terse bullets. The actions bumps (#55) and the docs (#56)
do not change what users get.
Next: Tag v0.6.1-rc.1, then v0.6.1 on the same commit to test #54.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant