Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

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

Etienne Lescotf62162b18274
diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml
index a592488c7..f9e8d2c73 100644
--- a/.github/workflows/prerelease.yml
+++ b/.github/workflows/prerelease.yml
@@ -133,7 +133,14 @@ jobs:
# GITHUB_TOKEN tag pushes don't fire the build.yml trigger in this setup,
# so dispatch it explicitly. The PAT ensures the build's release creation
# propagates to Tier 3 (homebrew/winget/nix/aur) via release: published.
+ #
+ # --ref is REQUIRED: the RC version bump lives ONLY on the release branch /
+ # RC tag, never on the default branch. Without --ref the build runs on main
+ # (still the previous stable version), so build.yml's publish-release step
+ # fails its guard ("package.json version X does not match <rc> from tag").
+ # Pin the build to the RC tag so checkout gets the bumped package.json + code.
gh workflow run build.yml \
+ --ref "${RC_TAG}" \
-f release_tag="${RC_TAG}" \
-f arch=both \
--repo "$GITHUB_REPOSITORY"
diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml
index ac4cfc079..3e8214b9c 100644
--- a/.github/workflows/promote.yml
+++ b/.github/workflows/promote.yml
@@ -142,7 +142,13 @@ jobs:
run: |
set -euo pipefail
# GITHUB_TOKEN tag pushes don't fire build.yml in this setup, dispatch it.
+ #
+ # --ref pins the build to the stable tag (the frozen release-branch tip). The
+ # prior main-merge step usually leaves main at the stable version already, but
+ # relying on that is fragile; building the tag guarantees checkout has the
+ # matching package.json + code and enables signing/notarization (tag has no '-').
gh workflow run build.yml \
+ --ref "${STABLE_TAG}" \
-f release_tag="${STABLE_TAG}" \
-f arch=both \
--repo "$GITHUB_REPOSITORY"