Repository navigation
fix(ci): attach pack zips to a draft release, then publish it - #13
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Release workflow has failed on every push to
mainsincecauldron-copper-v1.0.1: that release was published with no zip, releases in this repo are immutable, and the asset job'sgh release uploadgetsHTTP 422: Cannot upload assets to an immutable release.release-please-config.json:draft: trueandforce-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 withgh release upload --clobber, then publishes it.--clobberreplaces 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.1stays without a zip; it can't be repaired. The nextfixorfeatto a pack cutsv1.0.2through the new path, which is the first real test of it.Tested
force-tag-creationis supported by the pinnedrelease-please-actionv5.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 release uploadrelies 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).