Skip to content

fix(ci): attach pack zips to a draft release, then publish it - #13

Merged
davidmoralesz merged 2 commits into
mainfrom
fix/draft-release-for-immutable-releases
Oct 10, 2026
Merged

davidmoralesz merged 2 commits into
mainfrom
fix/draft-release-for-immutable-releases

Conversation

@davidmoralesz

@davidmoralesz davidmoralesz commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

The Release workflow has failed on every push to main since cauldron-copper-v1.0.1: that release was published with no zip, releases in this repo are immutable, and the asset job's gh release upload gets HTTP 422: Cannot upload assets to an immutable release.

  • release-please-config.json: draft: true and force-tag-creation: true, so release-please cuts a draft and creates the tag now rather than at publish.
  • release.yml: the asset job finds the release by listing, builds the pack at the tag, uploads the zip to the draft with gh release upload --clobber, then publishes it. --clobber replaces a zip left on the draft by a run that died before publishing, so a half-finished run heals on the next push. A published release with no zip (v1.0.1) is reported as a warning and skipped instead of failing the run.

v1.0.1 stays without a zip; it can't be repaired. The next fix or feat to a pack cuts v1.0.2 through the new path, which is the first real test of it.

Tested

  • actionlint, zizmor and the other local hooks pass.
  • The release lookup was checked against sample API output.
  • force-tag-creation is supported by the pinned release-please-action v5.0.0: it bundles release-please ^17.6.0, the option arrived in 17.2.0, and the compiled bundle at the pinned commit reads it and creates the tag ref before the release.
  • gh 2.101.0 resolves a draft release by its tag (read from its source), which is what gh release upload relies on here.

Not tested: the upload, the clobber path and the publish call have not run against GitHub yet.

The same change is needed in the shared Gradle release path for bimo-mod and tallyhopper before their first release (studiobimo/.github#65).

Releases here are immutable, so a published release can no longer take its zip: v1.0.1
went out with none and the asset job has failed on every push to main since. release-please
now cuts drafts and creates the tag itself, and the asset job uploads to the draft and
publishes it. A release already published without a zip is reported and skipped.
A run that attached the zip but died before publishing left it on the draft, and the next
run's upload under the same name was rejected, so the job failed on every push until the
draft was published by hand. gh release upload --clobber replaces it instead; gh resolves
a draft by its tag, so the upload no longer needs the raw assets endpoint.
@davidmoralesz
davidmoralesz merged commit a903d5a into main Oct 10, 2026
3 checks passed
@davidmoralesz
davidmoralesz deleted the fix/draft-release-for-immutable-releases branch October 10, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant