Repository navigation
fix(release): build the tag that started the run; a release's changelog from the previous one - #110
Merged
Merged
Conversation
…og from the previous one v0.1.0 was pushed on v0.1.0-rc.1's commit, and GoReleaser picked the rc tag: it built 0.1.0-rc.1 again and failed to upload onto the rc's release. GORELEASER_CURRENT_TAG is now the run's tag, and GORELEASER_PREVIOUS_TAG the previous release without a suffix (or the first commit), so that an rc on the same commit doesn't leave the changelog empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
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
.github/workflows/release.yml, the GoReleaser step:GORELEASER_CURRENT_TAGis the tag that started the run (github.ref_name).GORELEASER_PREVIOUS_TAGis the previous release without a suffix that sorts before it (sort -V), or the first commit for the first release; the step prints both.Why
v0.1.0was pushed on the commit ofv0.1.0-rc.1(8fccb7f). Left to itself, GoReleaser picked the rc tag: the run ofv0.1.0built0.1.0-rc.1again and failed uploading onto the rc's release (422 already_exists). Nothing was published or changed: the rc release, its assets and notes are as they were, and the run stopped before the image.Without a previous tag set, an rc on the same commit would also leave the final release's changelog empty.
Tests I ran
v0.1.0-rc.1→ first commit,v0.1.0→ first commit,v0.1.1→v0.1.0,v0.2.0-rc.1→v0.1.1,v0.2.0→v0.1.1, and a later hotfixv0.1.2→v0.1.1(notv0.2.0).--skip=publish,announce: archivesurbex_0.1.0_*,urbex versionsays0.1.0, 51 changelog entries.v0.1.0must be moved onto the newmain: a tag runs the workflow of its own commit, and 8fccb7f has the old one.Checklist before review
Part of urbforge/redemptor#53 (follows #102).
🤖 Generated with Claude Code
https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA