Skip to content

Replace prebuild upload with gh release create for immutable releases#294

Open
tidy-dev wants to merge 1 commit into
masterfrom
immutable-releases
Open

Replace prebuild upload with gh release create for immutable releases#294
tidy-dev wants to merge 1 commit into
masterfrom
immutable-releases

Conversation

@tidy-dev

Copy link
Copy Markdown
Contributor

Summary

Replaces the prebuild --upload-all release mechanism with gh release create --draft to support immutable releases.

Problem

prebuild creates a non-draft published release and then uploads assets in separate API calls. With immutable releases enabled, those uploads are rejected (422: Cannot upload assets to an immutable release). This is a known open issue in prebuild.

Solution

  • Replace yarn upload with gh release create ${{ github.ref_name }} prebuilds/*.tar.gz --generate-notes --draft
  • Change permissions from contents: read to contents: write (required for gh release create)
  • CI now creates a draft release with all assets attached atomically
  • A human reviews and publishes the draft, which locks it as immutable

Validation

Tested end-to-end on a fork (tidy-dev/registry-js) with immutable releases enabled:

Related

- Change permissions from contents: read to contents: write
- Replace yarn upload (prebuild --upload-all) with gh release create --draft
- CI now creates a draft release with assets; human publishes to make it immutable
- Update release docs to reflect new workflow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tidy-dev tidy-dev requested review from niik and sergiou87 June 30, 2026 11:54
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