Skip to content

fix(release): compute previous stable tag for GoReleaser changelog - #117

Merged
ddtcorex merged 1 commit into
masterfrom
fix/goreleaser-previous-tag-skip-beta
Aug 6, 2026
Merged

fix(release): compute previous stable tag for GoReleaser changelog#117
ddtcorex merged 1 commit into
masterfrom
fix/goreleaser-previous-tag-skip-beta

Conversation

@ddtcorex

@ddtcorex ddtcorex commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • v1.60.0's GitHub release notes shipped empty (just the GoReleaser footer) because GoReleaser's default "previous tag" resolution picked up v1.60.0-beta.2 instead of v1.59.0, and the only commit in between (chore: release v1.60.0) is excluded by changelog.filters.
  • Added a step to .github/workflows/release.yml that computes the latest non-prerelease tag (excluding the tag currently being released) and passes it to GoReleaser via --previous-tag, so the changelog always diffs against the last stable release regardless of intervening beta tags.

Closes #116

Test plan

  • Verified locally: for v1.60.0, the new lookup logic (git for-each-ref sorted by creatordate, filtered to tags without -, excluding self) resolves to v1.59.0 — matching the range that produced the correct local CHANGELOG.md entry.
  • Next real stable-release cut (with at least one beta tag ahead of it) confirms the GitHub Release page shows a populated changelog.

🤖 Generated with Claude Code

GoReleaser defaults to the nearest reachable git tag when building release
notes. Once beta tags started being cut directly from HEAD ahead of a
stable release, that nearest tag became the beta tag instead of the prior
stable release, and the only commit after it (the "chore: release" bump)
is excluded by changelog filters — leaving v1.60.0's GitHub release notes
empty. Explicitly pass --previous-tag pointing at the latest non-prerelease
tag so the changelog always diffs against the last stable release.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ddtcorex
ddtcorex merged commit eca220a into master Aug 6, 2026
@ddtcorex
ddtcorex deleted the fix/goreleaser-previous-tag-skip-beta branch August 6, 2026 19:56
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.

v1.60.0 GitHub release notes are empty (GoReleaser changelog regression)

1 participant