fix(release): attach assets to existing releases - #496
Closed
justrach wants to merge 1 commit into
Closed
Conversation
A maintainer can publish release notes before cross-compilation finishes. In that race, gh release create --draft made a second untagged draft with every binary while the published latest release stayed assetless, breaking graff update with a 404. Reuse an existing tagged release, upload the deterministic build artifacts with clobber for rerun safety, and fail the workflow unless every expected asset is visible. Co-Authored-By: Codegraff <blackfloofie@codegraff.com>
Owner
Author
|
Closing as landed in v0.0.252. |
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.
What changed
--clobberfor safe reruns.Why
Problem / failure mode
A maintainer published
v0.0.251while cross-compilation was still running. The workflow then rangh release create --draft, which silently created an untagged draft containing all eight assets. The published release remained assetless, sograff updatefollowed/releases/latest/download/install.shto a 404 even though the release job was green.Reason for this approach
The tagged release is the stable identity consumers already resolve through
/releases/latest. Attaching deterministic build outputs to it handles either ordering—manual publication before or after compilation—without changing release notes or tags. Explicit asset assertions keep the workflow from reporting success when the consumer-visible release is incomplete.Constraints and trade-offs
--clobberintentionally replaces same-name assets on reruns; release builds for one immutable tag are expected to be deterministic. The workflow still creates a draft by default and does not change when maintainers publish it.Rejected alternative
Documenting “wait for CI before publishing” leaves the updater vulnerable to the same timing mistake. Creating another tag or release would also break the stable latest-release URL instead of repairing the publication race.
Verification
gh: existing release uploads; missing release creates a draft; both pass the asset assertion.v0.0.251with the checksummed workflow artifacts and confirmed all eight assets are present.v0.0.250tov0.0.251; the installed binary reportsgraff 0.0.251.