[agent] fix: publish releases only after every asset is uploaded - #97
Merged
Merged
Conversation
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>
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.
[agent]
What and why
release-please published the GitHub release before the CD build jobs uploaded archives, so
/releases/latestpointed at a release with no assets for several minutes after every release and bothinstall.shandinstall.ps1failed (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 withgh release upload, and a finalpublish-releasejob publishes only after every target succeeds. Tags stayvX.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).
gh release edit --latestlet a delayed or re-run older release displace a newer one as/releases/latest. Publishing now PATCHes the release withdraft=false, make_latest=legacy(GitHub picks latest by version and date). Dropping--latestalone would not help: the API defaults newly published releases to latest.if:onpublish-releasewas redundant;needsalready skips it unless everybuild-releaseleg succeeds.draft,force-tag-creation(createsrefs/tags/<tag>before the draft), andinclude-component-in-tag; manifest mode emits unprefixedrelease_created/major/minor/patchfor.including for drafts;gh release upload/viewresolve drafts by tag.if:drops the implicitsuccess()gate, so a failed build still publishes" (CLAUDE-ONLY). GitHub docs: "A default status check ofsuccess()is applied unless you include one of these functions."-F draft=falseconfirmed to send a JSON boolean by capturing the request.Deferred
--clobberassets): a policy choice the task didn't settle; a successful job isn't re-run by "Re-run failed jobs".workflow_dispatchentry point to publish an orphaned draft: recovery is "Re-run failed jobs" (documented in the workflow); a full re-run does not re-emitrelease_created.make_latest=legacysemantics for backport branches: the repo releases frommainonly.Verification
$GITHUB_ENVlines not touched here.2.17.0matchesCargo.tomland tagv2.17.0.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
🤖 Generated with Claude Code