Skip to content

Commit f62162b

Browse files
EtienneLescotclaude
andcommitted
fix(release): pin build.yml dispatch to the release tag ref
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>
1 parent 1218235 commit f62162b

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

‎.github/workflows/prerelease.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,14 @@ jobs:
133133
# GITHUB_TOKEN tag pushes don't fire the build.yml trigger in this setup,
134134
# so dispatch it explicitly. The PAT ensures the build's release creation
135135
# propagates to Tier 3 (homebrew/winget/nix/aur) via release: published.
136+
#
137+
# --ref is REQUIRED: the RC version bump lives ONLY on the release branch /
138+
# RC tag, never on the default branch. Without --ref the build runs on main
139+
# (still the previous stable version), so build.yml's publish-release step
140+
# fails its guard ("package.json version X does not match <rc> from tag").
141+
# Pin the build to the RC tag so checkout gets the bumped package.json + code.
136142
gh workflow run build.yml \
143+
--ref "${RC_TAG}" \
137144
-f release_tag="${RC_TAG}" \
138145
-f arch=both \
139146
--repo "$GITHUB_REPOSITORY"

‎.github/workflows/promote.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@ jobs:
142142
run: |
143143
set -euo pipefail
144144
# GITHUB_TOKEN tag pushes don't fire build.yml in this setup, dispatch it.
145+
#
146+
# --ref pins the build to the stable tag (the frozen release-branch tip). The
147+
# prior main-merge step usually leaves main at the stable version already, but
148+
# relying on that is fragile; building the tag guarantees checkout has the
149+
# matching package.json + code and enables signing/notarization (tag has no '-').
145150
gh workflow run build.yml \
151+
--ref "${STABLE_TAG}" \
146152
-f release_tag="${STABLE_TAG}" \
147153
-f arch=both \
148154
--repo "$GITHUB_REPOSITORY"

0 commit comments

Comments
 (0)