Skip to content

[agent] fix: publish releases only after every asset is uploaded - #97

Merged
alexng353 merged 2 commits into
mainfrom
agent/draft-releases
Sep 27, 2026
Merged

alexng353 merged 2 commits into
mainfrom
agent/draft-releases

Conversation

@alexng353

Copy link
Copy Markdown
Member

[agent]

What and why

release-please published the GitHub release before the CD build jobs uploaded archives, so /releases/latest pointed at a release with no assets for several minutes after every release and both install.sh and install.ps1 failed (observed on v2.17.0: published 09:43:02, Windows zip uploaded 09:48:28). release-please now creates the release as a draft with the tag forced immediately (so the next changelog still finds it), each build uploads to the draft with gh release upload, and a final publish-release job publishes only after every target succeeds. Tags stay vX.Y.Z, the release PR/changelog flow is unchanged, and checksum sidecars still upload. Installer logic and the build matrix are out of scope.

Review

Full comb (correctness, halal boundary, premise, simplification; Claude + vassal each), then a one-round re-comb of the fix commit (Claude + vassal, correctness and premise).

  • AGREED (fixed): gh release edit --latest let a delayed or re-run older release displace a newer one as /releases/latest. Publishing now PATCHes the release with draft=false, make_latest=legacy (GitHub picks latest by version and date). Dropping --latest alone would not help: the API defaults newly published releases to latest.
  • AGREED (fixed): the job-level if: on publish-release was redundant; needs already skips it unless every build-release leg succeeds.
  • CLAUDE-ONLY (applied): upload step moves version/target into env vars; comments point at the config file that holds the draft policy.
  • Halal (both models, clean): release-please-action v4.4.1 bundles release-please 17.3.0, which supports draft, force-tag-creation (creates refs/tags/<tag> before the draft), and include-component-in-tag; manifest mode emits unprefixed release_created/major/minor/patch for . including for drafts; gh release upload/view resolve drafts by tag.
  • Refuted: "a custom if: drops the implicit success() gate, so a failed build still publishes" (CLAUDE-ONLY). GitHub docs: "A default status check of success() is applied unless you include one of these functions."
  • Re-comb: no findings. -F draft=false confirmed to send a JSON boolean by capturing the request.

Deferred

  • Restricting uploads to drafts (so a re-run after publication cannot --clobber assets): a policy choice the task didn't settle; a successful job isn't re-run by "Re-run failed jobs".
  • workflow_dispatch entry point to publish an orphaned draft: recovery is "Re-run failed jobs" (documented in the workflow); a full re-run does not re-emit release_created.
  • make_latest=legacy semantics for backport branches: the repo releases from main only.

Verification

  • actionlint: clean apart from two pre-existing SC2086 info notes on $GITHUB_ENV lines not touched here.
  • Config validated against the release-please 17.3.0 schema (vassal halal pass); manifest 2.17.0 matches Cargo.toml and tag v2.17.0.
  • Not exercised live: the next real release is the first end-to-end run.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

🤖 Generated with Claude Code

alexng353 and others added 2 commits September 27, 2026 03:05
release-please published the GitHub release before CD built and
uploaded archives, so /releases/latest pointed at a release with no
assets for several minutes and both installers failed. Releases are now
created as drafts (with the tag forced immediately so changelogs still
find it), assets upload to the draft via gh, and a final job publishes
it once every target has uploaded. A failed build leaves the draft
unpublished.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Publishing with --latest let a delayed or re-run older release displace
a newer one. Publish through the API with make_latest=legacy so GitHub
chooses latest by version and date. Also drop the redundant job
condition (needs already gates on every build succeeding) and document
the recovery path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alexng353
alexng353 merged commit 3114244 into main Sep 27, 2026
6 checks passed
@alexng353
alexng353 deleted the agent/draft-releases branch September 27, 2026 10:22
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