Fix GoReleaser using wrong tag for concurrent releases#918
Merged
gtrrz-victor merged 3 commits intomainfrom Apr 10, 2026
Merged
Fix GoReleaser using wrong tag for concurrent releases#918gtrrz-victor merged 3 commits intomainfrom
gtrrz-victor merged 3 commits intomainfrom
Conversation
… same commit Set GORELEASER_CURRENT_TAG to the tag that triggered the workflow, preventing GoReleaser from auto-detecting the wrong tag when multiple tags point to the same commit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 529d3467b937
pjbgf
previously approved these changes
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Ensures GoReleaser uses the correct tag when multiple tags (e.g., nightly and stable) point to the same commit, preventing version mix-ups during concurrent releases.
Changes:
- Sets
GORELEASER_CURRENT_TAGto${{ github.ref_name }}in the release workflow to override GoReleaser’s tag auto-detection.
Contributor
Author
|
Added |
pjbgf
reviewed
Apr 10, 2026
Add version input to workflow_dispatch trigger and unify all tag references through a RELEASE_TAG job-level env var that resolves correctly for both push and manual dispatch triggers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: cf7894a93e60
cb202df to
afed0d2
Compare
Expose the resolved tag once for all jobs (checkout, GoReleaser, Slack notifications) and reuse env.RELEASE_TAG in expressions. Made-with: Cursor Entire-Checkpoint: 06c12cb77931
pjbgf
approved these changes
Apr 10, 2026
Member
pjbgf
left a comment
There was a problem hiding this comment.
In the future we could add some validation - if the tag does not align with a given pattern it stops early.
I think we have some sort of validation on the script, but it would be good a fail safe earlier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
env.RELEASE_TAG(manualworkflow_dispatchversioninput orgithub.ref_nameon tag push) so checkout, GoReleaser, and failure notifications all use the same valueGORELEASER_CURRENT_TAGto${{ env.RELEASE_TAG }}so GoReleaser does not auto-detect the wrong tag when nightly and stable releases are created from the same commitworkflow_dispatchwith a requiredversioninput for manual releasesTest plan
versionset to an existing tag and confirm checkout and artifacts match that tag🤖 Generated with Claude Code
Note
Medium Risk
Touches the release pipeline by overriding GoReleaser tag detection, which could impact versioning/published artifacts if misconfigured, but the change is small and isolated to CI.
Overview
Ensures concurrent tag-based releases (e.g., nightly and stable from the same commit) use the intended version by explicitly setting
GORELEASER_CURRENT_TAGtogithub.ref_namein the GitHub Actionsrelease.ymlGoReleaser step.Reviewed by Cursor Bugbot for commit 6394501. Configure here.