Skip to content

Commit f2e1633

Browse files
Userclaude
authored andcommitted
fix(ci): build the exact bumped commit (not floating main) — kills the version race
The build checked out 'main', so concurrent pushes (each bumping the version) raced: builds published mismatched/duplicate releases (v0.0.20 had partial binaries, v0.0.21 no DMG, etc.). The version job now outputs its commit SHA and the build checks that out, so every release is internally consistent. Also re-triggers a build for the notarization fix that didn't get one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 02ea410 commit f2e1633

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
outputs:
2222
version: ${{ steps.bump.outputs.version }}
23+
sha: ${{ steps.bump.outputs.sha }}
2324
steps:
2425
- uses: actions/checkout@v4
2526
with:
@@ -39,6 +40,10 @@ jobs:
3940
git add package.json package-lock.json
4041
git commit -m "chore: bump version to $VERSION [skip ci]"
4142
git push
43+
# Pin the build to THIS exact commit, not floating main — otherwise a
44+
# concurrent push's bump can advance main and the build publishes a
45+
# mismatched/duplicate release (the version race that tangled v0.0.20/.21).
46+
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
4247
4348
# Build + publish per-OS natively (native modules + platform binaries differ).
4449
build:
@@ -53,7 +58,7 @@ jobs:
5358
steps:
5459
- uses: actions/checkout@v4
5560
with:
56-
ref: main # the just-bumped commit
61+
ref: ${{ needs.version.outputs.sha }} # the exact bumped commit, not floating main
5762
fetch-depth: 0
5863
lfs: true # resources/bin/* (llama-server, sd-cli, whisper, ffmpeg, dylibs)
5964
# are Git LFS — without this, CI bundles 131-byte pointer stubs

0 commit comments

Comments
 (0)