fix(release): pin build dispatch to the tag, fix release-branch naming#90
Merged
Merged
Conversation
📝 WalkthroughWalkthroughRelease workflows now create or reuse frozen prerelease branches, tag RCs from the target release branch, and dispatch ChangesRelease workflow snapshot handling
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
prerelease.yml triggered build.yml without --ref, so the build ran on the
default branch (main), where package.json is still the previous stable
version. The RC version bump lives only on the release branch / RC tag, so
build.yml's publish-release guard rejected it ("package.json version 1.6.0
does not match 1.7.0-rc.1 from tag v1.7.0-rc.1") and no release was created.
Pass --ref so the build checks out the tag's tree (bumped package.json +
frozen code). Apply the same pin in promote.yml for the stable build, which
previously only worked because the main-merge happened to leave main at the
stable version first.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ross RCs
prerelease.yml created release/v${PRERELEASE} (e.g. release/v1.7.0-rc.1) but
promote.yml resolves release/v${STABLE_VERSION} (release/v1.7.0), so promote
would die at `git fetch origin release/v1.7.0`. v1.7.0-rc.1 is the first RC cut
under the release-branch freeze, so this path had never run.
Worse, each re-cut created a *new* branch off main and force-deleted the remote
branch first, so cutting rc.2 would both sweep in whatever had landed on main
and destroy the cherry-picks on the rc.1 branch. That silently defeats the
freeze the contract is supposed to guarantee.
Use one branch per stable version (release/vX.Y.Z), created at rc.1 and reused
for later RCs: fetch and check it out when it exists, branch from the dispatched
ref when it doesn't, and never delete it. Fold the package.json bump into the
same step so the version is written after the correct branch is checked out.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
02759fc to
1d6a8a1
Compare
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.
Two bugs in the release pipeline, both found while cutting v1.7.0-rc.1 (the first RC under the release-branch freeze, so neither path had ever run).
1. Build dispatched on the wrong ref
prerelease.ymlrangh workflow run build.ymlwithout--ref, so the build dispatched on the default branch (main), wherepackage.jsonis still the previous stable version. The RC bump lives only on the release branch, sobuild.yml's publish guard rejected it:No release was created, and the installers were stamped
1.6.0. Fixed by pinning--ref "${RC_TAG}"(and--ref "${STABLE_TAG}"inpromote.yml, which only worked before because the preceding main-merge happened to leavemainat the stable version).2. Release branch naming breaks promote and defeats the freeze
prerelease.ymlcreatedrelease/v${PRERELEASE}→release/v1.7.0-rc.1promote.ymlresolvesrelease/v${STABLE_VERSION}→release/v1.7.0That branch doesn't exist, so promote would have failed at
git fetch origin release/v1.7.0.Worse: each re-cut created a new branch off
mainand force-deleted the remote branch first. Cutting rc.2 would therefore sweep in anything landed onmainand destroy the cherry-picks on the rc.1 branch — silently defeating the freeze the contract exists to guarantee.Fixed by using one branch per stable version (
release/vX.Y.Z), created at rc.1 and reused for later RCs: fetch + check out when it exists, branch from the dispatched ref when it doesn't, never delete. Thepackage.jsonbump moved into the same step so the version is written after the correct branch is checked out.Verification
build.yml --ref v1.7.0-rc.1(equivalent of fix 1) ran green on Windows/macOS(arm64+x64)/Linux and publishedv1.7.0-rc.1with 6 assets.release/v1.7.0and let promote resolve it.🤖 Generated with Claude Code
Summary by CodeRabbit