Skip to content

ci: anchor RC release notes at the previous tag in version order#54

Merged
i999rri merged 1 commit into
devfrom
fix/release-notes-rc1-baseline
May 23, 2026
Merged

ci: anchor RC release notes at the previous tag in version order#54
i999rri merged 1 commit into
devfrom
fix/release-notes-rc1-baseline

Conversation

@i999rri
Copy link
Copy Markdown
Owner

@i999rri i999rri commented May 18, 2026

Summary

v0.3.1-rc1 was released with auto-generated notes covering every PR since v0.2.2, not the PRs since v0.3.0-rc1. The body has been edited manually but the bug stays in release.yml and would bite the next RC1 cut on a new patch line.

Root cause

The "Determine previous tag for changelog" step had two branches for RC tags:

  1. RC2+ of the same base — find earlier RC of same X.Y.Z.
  2. Otherwise — fall through to "latest production tag".

For vX.Y.Z-rc1 cut on a new patch line, branch 1 returned empty and the fallback reached past v(X.Y-1).Z-rcN all the way to the last production tag.

Fix

Drop the fallback. Pick the tag immediately before the current ref in version order (RC or production, whichever is closest). Verified locally with sort -V | awk against:

  • v0.3.1-rc1v0.3.0-rc1 ✓ (was: v0.2.2)
  • v0.4.0-rc1v0.3.1-rc1
  • v0.3.1-rc2v0.3.1-rc1 ✓ (still routes through the same-base branch first)

Test plan

  • Edit v0.3.1-rc1 release body via gh api releases/generate-notes + gh release edit (already done out-of-band).
  • Next RC tag fires release.yml and the body lands correct without manual editing.

The previous baseline logic for `vX.Y.Z-rc1` only looked for an
earlier RC of the same `X.Y.Z` base and otherwise fell back to the
most recent production tag. When the RC1 came from a new patch
line (e.g. v0.3.1-rc1 cut on top of v0.3.0-rcN), the fallback
reached past every prior RC and anchored at the last production
tag, dragging in every PR since then. The resulting release notes
covered the wrong range.

Drop the fallback and pick the tag immediately before the current
ref in version order, regardless of whether that tag is an RC or
production. Sort -V handles rc1/rc10 ordering. Awk walks the
sorted list and remembers the line that precedes the current ref.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@i999rri i999rri added this to the 0.3.1 milestone May 20, 2026
@i999rri i999rri self-assigned this May 20, 2026
@i999rri i999rri modified the milestones: 0.3.1, 0.4.0 May 20, 2026
@i999rri i999rri merged commit 27a2b94 into dev May 23, 2026
4 checks passed
@i999rri i999rri deleted the fix/release-notes-rc1-baseline branch May 23, 2026 07:51
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