Skip to content

fix(release): stop clobbering binaries semantic-release already uploaded - #41

Merged
volod-vana merged 1 commit into
mainfrom
volod/release-asset-clobber
Sep 18, 2026
Merged

volod-vana merged 1 commit into
mainfrom
volod/release-asset-clobber

Conversation

@volod-vana

Copy link
Copy Markdown
Member

What broke

v0.24.0 shipped a GitHub release with two of its four binaries missing.

@semantic-release/github uploads the tarballs, the zip and their checksums. The Attach release assets step then ran collect-release-assets.mjs, which lists that same set again, and re-uploaded it with --clobber. --clobber deletes the existing asset before writing the replacement, so every release has a window where the binaries do not exist.

The uploads API returned HTTP 500 inside that window. Result: vana-linux-x64.tar.gz and vana-darwin-arm64.tar.gz were gone while their .sha256 files remained, pointing at 404s. Because the step failed, publish-npm and verify-release-install were both skipped, so npm stayed on 0.23.13.

Rerunning the job reproduced it exactly: the clobber wiped all four binaries, restored three, and 500'd on vana-win32-x64.zip.

The fix

  1. collect-release-assets.mjs takes --skip-binaries, and the release workflow passes it. The step now uploads only what semantic-release does not own: the Homebrew formula, the winget manifest, and the demo assets. Prereleases keep the old behaviour because semantic-release never runs there, so they still need the binaries from this script.
  2. Bounded retry around the upload. This is not speculative: restoring the assets by hand needed two attempts per file, and one of the 500s was on a 50KB gif (Error creating asset temp dir). A blip here also strands the npm publish behind a GitHub release that already shipped.

v0.24.0

Already repaired by hand. All four binaries are back and byte-identical to the checksums the release publishes, and the darwin-arm64 build runs and reports 0.24.0 with a valid Developer ID Application: Corsali, Inc signature.

npm is still on 0.23.13. Merging this cuts a patch through the fixed path, which publishes npm and runs the install smoke test.

Test plan

  • pnpm validate green, 376 tests
  • collect-release-assets.mjs emits binaries by default and drops only them under --skip-binaries
  • every v0.24.0 binary verified against its published checksum
  • published darwin-arm64 binary extracts, is signed, and prints its version
  • merge cuts a release whose assets land in one pass and whose publish-npm job runs

The attach step re-listed the same tarballs semantic-release had just
published and pushed them again with `--clobber`, which deletes the good
asset before writing the replacement. When the uploads API returned a 500
mid-flight on v0.24.0 the release was left advertising checksums for
tarballs that no longer existed, and the failed step skipped publish-npm.

Collect only the assets semantic-release does not own, and retry the
upload, which took two attempts by hand even for a 50KB gif.
@volod-vana
volod-vana merged commit af7351b into main Sep 18, 2026
6 checks passed
@volod-vana
volod-vana deleted the volod/release-asset-clobber branch September 18, 2026 21:42
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2026
## [0.24.1](v0.24.0...v0.24.1) (2026-09-18)

### Bug Fixes

* **release:** stop clobbering binaries semantic-release already uploaded ([#41](#41)) ([af7351b](af7351b))
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.24.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant