Skip to content

fix(release): pin build.yml dispatch to the release tag ref#90

Open
EtienneLescot wants to merge 1 commit into
mainfrom
claude/prerelease-version-tag-ee96ae
Open

fix(release): pin build.yml dispatch to the release tag ref#90
EtienneLescot wants to merge 1 commit into
mainfrom
claude/prerelease-version-tag-ee96ae

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

Cutting v1.7.0-rc.1 from main via prerelease.yml created the tag and frozen release/v1.7.0-rc.1 branch correctly, but the build it triggered failed at publish:

##[error]package.json version 1.6.0 does not match 1.7.0-rc.1 from tag v1.7.0-rc.1

Root cause: prerelease.yml's Trigger build workflow step ran gh workflow run build.yml without --ref, so the build dispatched on the default branch (main), where package.json is still the previous stable version (1.6.0). The RC version bump lives only on the release branch / RC tag, so build.yml's publish-release version guard rejected it and no GitHub release was created. The installer jobs also stamped the wrong version (1.6.0).

The v1.7.0-rc.1 pre-release was recovered manually by re-dispatching build.yml --ref v1.7.0-rc.1; it is now published. This PR fixes the pipeline so no manual recovery is needed next time.

Fix

  • prerelease.yml: add --ref "${RC_TAG}" so the build checks out the RC tag's tree (bumped package.json + frozen code).
  • promote.yml: add --ref "${STABLE_TAG}" for the same reason. Stable builds previously only passed because the preceding main-merge happened to leave main at the stable version — pinning the tag makes it robust and correctly enables signing/notarization (the stable tag has no -).

Verification

build.yml --ref v1.7.0-rc.1 -f release_tag=v1.7.0-rc.1 (the equivalent of the fixed dispatch) ran green across Windows/macOS(arm64+x64)/Linux and published v1.7.0-rc.1 as a pre-release with 6 assets.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved prerelease and promotion build reliability by ensuring builds use the correct release tag and matching package version.
    • Prevented release builds from unintentionally using outdated information from the default branch.

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>
@coderabbitai

coderabbitai Bot commented Jul 15, 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: ae037e80-60aa-4f31-b1e8-1abb3dc5f41f

📥 Commits

Reviewing files that changed from the base of the PR and between 68d3a68 and 02759fc.

📒 Files selected for processing (2)
  • .github/workflows/prerelease.yml
  • .github/workflows/promote.yml

📝 Walkthrough

Walkthrough

Release workflows now explicitly dispatch build.yml from the matching RC or stable tag, ensuring the build uses the release snapshot and version metadata.

Changes

Release build ref pinning

Layer / File(s) Summary
Pin release workflow dispatches
.github/workflows/prerelease.yml, .github/workflows/promote.yml
Prerelease dispatches use ${RC_TAG}, while promotion dispatches use ${STABLE_TAG}; comments document the tag-specific checkout requirement.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it does not follow the required template and omits several required sections. Reformat the PR body to match the template and add Related issue, Type of change, Release impact, Desktop impact, and Screenshots/video sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: pinning build.yml dispatches to the release tag ref.
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 claude/prerelease-version-tag-ee96ae

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.

❤️ Share

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

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