fix(release): publish prereleases from a draft so assets upload - #333
Open
mayankpande88 wants to merge 1 commit into
Open
fix(release): publish prereleases from a draft so assets upload#333mayankpande88 wants to merge 1 commit into
mayankpande88 wants to merge 1 commit into
Conversation
Immutable releases reject asset uploads after publication, and a prerelease is published the moment it is created. The binaries therefore failed to attach on v0.1.7-rc.1, taking the whole release job to a failure even though the image had already been pushed: Cannot upload asset nudgebee-node-agent-0.1.7-rc.1-arm64 to an immutable release. GitHub only allows asset uploads before a release is published, but draft prereleases publish with the release.published event instead of release.prereleased. This is not specific to that tag — every RC would have failed the same way, and RCs are how this repo validates changes before a full release. Prereleases are now created as a draft, which stays writable for the upload, then published in a following step. Full releases are unaffected and stay non-draft, which is why only RCs ever broke. Downstream consumers should watch release.published, which fires for both paths.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
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.
Problem
Immutable releases reject asset uploads after publication, and a prerelease is published the moment it is created. So the binaries failed to attach on
v0.1.7-rc.1, failing the whole release job even though the image had already been pushed:This is not specific to that tag — every RC fails the same way, and RCs are how this repo validates changes before a full release.
Confirmed by contrast:
v0.1.7(a full release) took the non-draft path and published cleanly with both binaries attached. Only prereleases are affected, which is why this went unnoticed until we started cutting RCs.Fix
Prereleases are created as a draft, which stays writable long enough for the upload, then published in a following step. GitHub's own error message prescribes exactly this.
Full releases are unaffected and stay non-draft.
Downstream consumers should watch
release.published, which fires for both paths.Testing
YAML validated. The behaviour itself can only be exercised by pushing a real prerelease tag — the next
-rctag is the test. If it regresses, the symptom is identical to the one above and the image still publishes regardless, so the blast radius is a red job rather than a broken release.