fix(release): attach firmware before publishing, for immutable releases - #122
Merged
Merged
Conversation
Run 30205005779 released airhound-v0.1.1 but publish-release failed: Cannot upload assets to an immutable release. Immutable releases are enabled on this repo, and a published release cannot accept new assets. release-please published the release, then softprops/action-gh-release tried to attach the .bin files to it. Have release-please create the release as a draft, and let publish-release attach the binaries and flip it to published in the same call — the draft -> upload -> publish order immutability requires. v0.1.1 shipped without firmware as a result; the binaries survive as workflow artifacts on run 30205005779. This fixes it going forward. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRhJ5dF3N3z7X63aRaDBcQ
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.
Problem
Merging #121 cut
airhound-v0.1.1, both firmware builds succeeded, and thenpublish-releasefailed in run 30205005779:airhound-v0.1.1therefore shipped with no.binfiles attached.Immutable releases are enabled on this repo. A published release cannot accept new assets — they must be present before publication. The workflow did the opposite:
release-pleasecreated and published the release, andsoftprops/action-gh-releasethen tried to attach the binaries to it.The build order is not the problem —
publish-releasecorrectly waits onbuild-release. The problem is that the release is already published by the time the assets exist.Fix
release-please-config.json— add"draft": true, so release-please creates the release as a draft and does not publish it.release.yml—softprops/action-gh-releasegainsdraft: false, so the same call that uploads the.binfiles also flips the release to published.That produces the draft → upload → publish sequence immutability requires, while keeping release-please as the owner of versioning and release notes.
Note on the tag
A draft release does not create its git tag until it is published, so the
airhound-v*tag now appears at publish time rather than at release-please time. Ifpublish-releasefails, no tag is created and the run can simply be retried — which is arguably better than today, where a failed publish leaves a tagged release with missing artifacts.v0.1.1
Cannot be repaired: the release is immutable, so the binaries can never be attached to it. They do survive as workflow artifacts on run 30205005779 if they are needed. The next release will attach them normally.
Related
This is the same failure class as
stocktrim-openapi-client#237, which hit it viagh release upload --clobberagainst a python-semantic-release-published release. Same cause, different tooling.🤖 Generated with Claude Code
https://claude.ai/code/session_01QRhJ5dF3N3z7X63aRaDBcQ