Skip to content

release: create the release before uploading into it - #47

Merged
DeviousCardi merged 1 commit into
mainfrom
release-create-first
Sep 9, 2026
Merged

DeviousCardi merged 1 commit into
mainfrom
release-create-first

Conversation

@DeviousCardi

Copy link
Copy Markdown
Owner

v0.9.0 failed. The real output, from the x86_64 leg:

Finished `release` profile [optimized] target(s) in 2m 01s
+ tar acf .../specmatrix-v0.9.0-x86_64-unknown-linux-gnu.tar.gz specmatrix
d69cad58...  specmatrix-v0.9.0-x86_64-unknown-linux-gnu.tar.gz
release not found
release not found
...  (eleven times)
##[error]Process completed with exit code 1.

The binaries built. Nothing was published.

taiki-e/upload-rust-binary-action does not create a release — it waits for
one 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 release job now creates it once before any build runs, and build needs
it. One job rather than a step in the matrix, so the legs cannot race.

It is idempotent (gh release view first, exit 0 if present) because that is
exactly the state a partly failed release re-run is in. Notes come from the
tag annotation, with a fallback for an unannotated tag since gh rejects an
empty --notes-file.

v0.9.0 was recovered by hand — release created, failed jobs re-run, both
architectures attached:

specmatrix-v0.9.0-aarch64-unknown-linux-gnu.tar.gz  + .sha256
specmatrix-v0.9.0-x86_64-unknown-linux-gnu.tar.gz   + .sha256

This change is so the next tag does not need that.

🤖 Generated with Claude Code

`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>
@DeviousCardi
DeviousCardi merged commit a0c7a5d into main Sep 9, 2026
3 checks passed
@DeviousCardi
DeviousCardi deleted the release-create-first branch September 9, 2026 17:03
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