Skip to content

fix(release): attach firmware before publishing, for immutable releases - #122

Merged
dougborg merged 1 commit into
mainfrom
fix/immutable-release-assets
Jul 26, 2026
Merged

dougborg merged 1 commit into
mainfrom
fix/immutable-release-assets

Conversation

@dougborg

Copy link
Copy Markdown
Owner

Problem

Merging #121 cut airhound-v0.1.1, both firmware builds succeeded, and then publish-release failed in run 30205005779:

##[error]Cannot upload assets to an immutable release. - https://docs.github.com/rest

airhound-v0.1.1 therefore shipped with no .bin files 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-please created and published the release, and softprops/action-gh-release then tried to attach the binaries to it.

The build order is not the problem — publish-release correctly waits on build-release. The problem is that the release is already published by the time the assets exist.

Fix

  1. release-please-config.json — add "draft": true, so release-please creates the release as a draft and does not publish it.
  2. release.yml — softprops/action-gh-release gains draft: false, so the same call that uploads the .bin files 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. If publish-release fails, 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 via gh release upload --clobber against a python-semantic-release-published release. Same cause, different tooling.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QRhJ5dF3N3z7X63aRaDBcQ

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
@github-actions

Copy link
Copy Markdown

Preview Binaries

Flashable firmware binaries for this PR:

no_std (Embassy)

Artifact Size Download
bin-m5stickc 0.5 MB Download
bin-xiao 0.5 MB Download

std (ESP-IDF)

Artifact Size Download
bin-m5stickc-std 0.8 MB Download
bin-xiao-std 0.8 MB Download

@dougborg
dougborg merged commit 8a3b536 into main Jul 26, 2026
15 checks passed
@dougborg
dougborg deleted the fix/immutable-release-assets branch July 26, 2026 14:06
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