Skip to content

ci(release): graduate prerelease versions on stable bumps - #837

Merged
Aymericr merged 1 commit into
mainfrom
fix/release-graduate-prerelease
Sep 10, 2026
Merged

ci(release): graduate prerelease versions on stable bumps#837
Aymericr merged 1 commit into
mainfrom
fix/release-graduate-prerelease

Conversation

@Aymericr

@Aymericr Aymericr commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

bump_version in release.yml split 1.0.0-beta.5 on dots for stable bumps, so major gave 2.0.0, minor gave 1.1.0, patch failed on 0-beta arithmetic, and none would have published a beta version to latest. Any stable bump on a prerelease now graduates it to its base version (1.0.0-beta.N1.0.0), matching npm semver. Needed to release the current beta line as 1.0.0.

Checked with the function extracted into bash: 1.0.0-beta.5 major → 1.0.0, 1.0.0-beta.6 patch → 1.0.0, 1.0.0 major → 2.0.0, 1.0.0 patch → 1.0.1, 0.9.2 major → 1.0.0, none unchanged.

How to test

  1. Dispatch release.yml from this branch with package=all, bump=major, dry-run=true and read the "Bumped @pascal-app/… → 1.0.0" lines.

Screenshots / screen recording

N/A

Checklist

  • I've tested this locally with bun dev (not applicable)
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

🤖 Generated with Claude Code


Note

Medium Risk
Changes release automation that sets published npm versions and tags; incorrect logic could ship wrong semver to latest, though scope is limited to the workflow bump helper.

Overview
Fixes release workflow version bumping when the current version is a npm prerelease (e.g. 1.0.0-beta.5).

bump_version in release.yml now treats patch/minor/major on a prerelease as graduation to the stable base (1.0.0-beta.N1.0.0), aligned with npm semver, instead of splitting the string on . (which produced wrong majors/minors or broken patch math). none is handled before stable bumps so versions stay unchanged. The manual bump input description documents this graduation behavior for stable bumps on prereleases.

Reviewed by Cursor Bugbot for commit 432fb21. Bugbot is set up for automated code reviews on this repo. Configure here.

The stable-bump path split "1.0.0-beta.5" on dots, so major produced
2.0.0, minor 1.1.0, patch failed on "0-beta" arithmetic, and none would
have published a beta version on the latest dist-tag. Any stable bump on
a prerelease now yields its base version, matching npm semver, so the
1.0.0-beta.N line can be released as 1.0.0.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@pascal

pascal Bot commented Sep 10, 2026

Copy link
Copy Markdown

I hit an error while handling your request (Model unavailable on AI Gateway free tier: Free tier users do not have access to this model. Upgrade to paid credits at https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Fmodal%3Dtop-up for unrestricted…).

Please try again, rephrase, or reach out if it keeps failing.

Error id: 0d5e0621-c0c5-47ec-9904-5c22dd105ed1

@Aymericr
Aymericr merged commit 831c300 into main Sep 10, 2026
5 checks passed
@Aymericr
Aymericr deleted the fix/release-graduate-prerelease branch September 10, 2026 23:00
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