ci: don't publish release if any upload-assets target failed#464
Conversation
GitHub immutable releases are enabled, so a published release's assets can't be replaced after the fact. The previous `always()` gate would flip the draft to non-draft even with a missing platform tarball, leaving downstream npm / COPR / PPA jobs to fail trying to fetch holes — and once published, the only fix is to bump the version and re-cut the whole release. Drop `always()` so publish-release skips when any matrix target fails. The draft stays in place; recovery is to re-run `release.yml` via workflow_dispatch on the tag to fill the missing assets, then flip the draft by hand or workflow_dispatch release-plz.yml again. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryRemoves Confidence Score: 4/5Safe to merge; the main behavioural goal is achieved and the one finding is a harmless discrepancy between the PR description and GHA semantics. Only a P2 finding (enhance-release still runs on the draft contrary to the stated description) — no data loss or incorrect publish path is introduced. .github/workflows/release-plz.yml — Important Files Changed
|
Benchmark changesVersions:
Public ratios: warm installs vs Bun 6x -> 12x; warm installs vs pnpm 10x -> 17x.
4cced3d vs 3ed617b | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
Summary
GitHub immutable releases are enabled — a published release's assets can't be replaced after the fact. The previous
always()gate onpublish-releasewould flip the draft to non-draft even if one platform tarball was missing, leaving the downstream npm / COPR / PPA jobs (triggered by therelease: publishedevent) to fail fetching holes. Once published with missing assets, the only fix is to bump the version and re-cut the whole release.This PR drops
always()sopublish-releaseskips when any matrix target inupload-assetsfails. Withoutalways(), the default GitHub Actions semantic is "skip if any needed job didn't succeed", which is exactly what we want here.enhance-release(whichneeds: publish-release) skips transitively, so a half-built release also doesn't get communique-ed notes attached to it.Recovery flow when this kicks in
release.ymlvia workflow_dispatch withtag: vX.Y.Zto fill the missing assets onto the existing draft.gh release edit vX.Y.Z --draft=false(which firesrelease: publishedand triggers the downstream publishers), or workflow_dispatchrelease-plz.ymlagain sopublish-releaseruns.Test plan
actionlintcleanpublish-releaseis skipped and the draft remains a draft🤖 Generated with Claude Code
Note
Medium Risk
Changes release automation gating so a GitHub release will no longer be published if any
upload-assetsmatrix target fails, which could delay releases if the dependency chain or job conditions are misconfigured.Overview
Prevents
publish-releaseinrelease-plz.ymlfrom flipping a draft GitHub release to published unless theupload-assetsjob succeeds, avoiding immutable published releases with missing binaries.Updates the workflow documentation to explain why partial uploads must keep the release in draft and outlines the manual recovery flow (re-run
release.ymlfor the tag, then publish).Reviewed by Cursor Bugbot for commit 4cced3d. Bugbot is set up for automated code reviews on this repo. Configure here.