release: create the release before uploading into it - #47
Merged
Merged
Conversation
`v0.9.0` failed. Both matrix legs built their binaries, archived them and computed their checksums, then retried `release not found` eleven times and exited 1 — so the tag existed, the artefacts existed, and nothing was published. The workflow's own comment carried the wrong assumption: that `upload-rust-binary-action` uploads "to the release the pushed tag names, creating it if this is the first artefact for it". It does not create one. It waits for a release to exist and fails when none appears, and pushing a tag creates a tag, not a release. With two matrix legs both waiting, there was nobody to create it. A `release` job now creates it once, before any build, and `build` depends on it. Deliberately one job rather than a step inside the matrix, so the two legs cannot race to create the same release. Two details the next re-run depends on: - it is idempotent — `gh release view` first, and exit 0 if the release is already there, so re-running a partly failed release does not fail here; - notes come from the tag's own annotation via `fetch-depth: 0`, with a fallback line for an unannotated tag, because `gh release create` rejects an empty `--notes-file`. v0.9.0 itself was recovered by hand — the release was created and the failed jobs re-run, and both architectures are attached. This is so the next tag does not need that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
v0.9.0failed. The real output, from the x86_64 leg:The binaries built. Nothing was published.
taiki-e/upload-rust-binary-actiondoes not create a release — it waits forone and fails if none appears. Pushing a tag creates a tag, not a release, and
with both matrix legs waiting there was nobody to create it. The workflow's
comment asserted the opposite ("creating it if this is the first artefact for
it"), which is why it was tagged in that state.
A
releasejob now creates it once before any build runs, andbuildneedsit. One job rather than a step in the matrix, so the legs cannot race.
It is idempotent (
gh release viewfirst, exit 0 if present) because that isexactly the state a partly failed release re-run is in. Notes come from the
tag annotation, with a fallback for an unannotated tag since
ghrejects anempty
--notes-file.v0.9.0was recovered by hand — release created, failed jobs re-run, botharchitectures attached:
This change is so the next tag does not need that.
🤖 Generated with Claude Code