Skip to content

Don't bump the version after a release candidate - #396

Merged
tylervick merged 1 commit into
mainfrom
fix-bump-prerelease
Aug 7, 2026
Merged

Don't bump the version after a release candidate#396
tylervick merged 1 commit into
mainfrom
fix-bump-prerelease

Conversation

@tylervick

@tylervick tylervick commented Aug 7, 2026

Copy link
Copy Markdown
Member

Found by cutting 3.0.0rc1. The release itself worked end to end — notarized, published, correctly marked as a prerelease, and Homebrew correctly left alone — but bump_version then opened #395 proposing to set Version.swift to 2.5.2-pre.53adfaf.

That is backwards: main is at 3.0.0-pre, and merging it would have regressed the version to a 2.5.x string.

Cause

The rc tag format is X.Y.ZrcN. That is not valid semver — semver requires X.Y.Z-rcN, with a hyphen. reecetech/version-increment could not parse 3.0.0rc1, silently fell back to the last tag it could parse (2.5.1), and incremented that to 2.5.2.

Worth noting this is the same root cause as the prerelease bug fixed in #394: the old check was contains(github.ref, '-'), which assumed the semver hyphen that this tag format doesn't have. The non-standard tag format has now caused two separate defects.

Fix

Skip bump_version for prereleases entirely. Bumping the version after a release candidate is wrong on its own terms — the rc is not the release — so this is the correct behaviour regardless of the parsing problem, and it doesn't paper over the tag format.

The condition reuses the build job's existing prerelease output rather than re-deriving it, so there is one source of truth for what counts as a prerelease.

Not fixed here

The tag format itself. Migrating X.Y.ZrcNX.Y.Z-rcN would make it real semver and remove this whole class of bug, but it changes an established convention and affects the tag-matching patterns. Worth doing deliberately, separately.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Version updates now run only after successful builds and releases.
    • Release candidate tags no longer trigger automatic version updates.

The bump_version job ran on rc tags and proposed a version that went
backwards: after 3.0.0rc1 it opened a PR setting Version.swift to
2.5.2-pre.53adfaf, regressing main from 3.0.0-pre.

Cause: rc tags use the form X.Y.ZrcN, which is not valid semver — that
would be X.Y.Z-rcN. reecetech/version-increment cannot parse it, so it
fell back to the last parseable tag (2.5.1) and incremented that.

Bumping after a release candidate is wrong regardless of parsing, so the
job now skips prereleases outright rather than papering over the tag
format. Reusing the build job's prerelease output keeps one source of
truth for what counts as a prerelease.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f2adf1dd-46e8-4997-b6d3-973983e15d88

📥 Commits

Reviewing files that changed from the base of the PR and between 53adfaf and f2ff8a0.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now runs bump_version only after build and release complete. The job also excludes prerelease builds while retaining push-event filtering.

Changes

Release workflow

Layer / File(s) Summary
Version bump gating
.github/workflows/release.yml
bump_version now depends on build and release. Its condition excludes prerelease builds and keeps push-event filtering.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the workflow change that skips version bumps after release candidate builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-bump-prerelease

Comment @coderabbitai help to get the list of available commands.

@tylervick
tylervick merged commit bb210cb into main Aug 7, 2026
6 checks passed
@tylervick
tylervick deleted the fix-bump-prerelease branch August 7, 2026 20:38
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