ci(release): graduate prerelease versions on stable bumps - #837
Merged
Conversation
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>
|
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 |
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.
What does this PR do?
bump_versioninrelease.ymlsplit1.0.0-beta.5on dots for stable bumps, somajorgave2.0.0,minorgave1.1.0,patchfailed on0-betaarithmetic, andnonewould have published a beta version tolatest. Any stable bump on a prerelease now graduates it to its base version (1.0.0-beta.N→1.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,noneunchanged.How to test
release.ymlfrom this branch withpackage=all,bump=major,dry-run=trueand read the "Bumped @pascal-app/… → 1.0.0" lines.Screenshots / screen recording
N/A
Checklist
bun dev(not applicable)bun checkto verify)mainbranch🤖 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_versioninrelease.ymlnow treats patch/minor/major on a prerelease as graduation to the stable base (1.0.0-beta.N→1.0.0), aligned with npm semver, instead of splitting the string on.(which produced wrong majors/minors or broken patch math).noneis handled before stable bumps so versions stay unchanged. The manualbumpinput 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.