ci: trigger the release on an unpublished version, fail on partial publish - #303
Merged
Conversation
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.
Two defects in the release pipeline, both of which have already fired.
The trigger could be silently lost
release.ymlpublished only when the head commit message started withrelease:. Squash-merging a release PR replaces the commit message with the PR title, so the prefix is discarded and the workflow skips. It still reports success, having done nothing. That happened on #302: rc.10 was merged and nothing published.The guard now keys off the actual signal, in a
checkjob: publish when the root crate's version is not on crates.io. The commit message and the merge strategy no longer matter.Verified against the live index:
A network or API failure during the check fails the job rather than resolving to "nothing to publish", so a transient error cannot silently skip a release.
A partial publish reported success
publish.shexited 0 if any crate published. The rc.9 run shows the consequence:Two of three crates "failed", the root published, the script exited 0.
v3.0.0-rc.9still has a git tag with no GitHub release because the tagging step then died partway.publish.shnow separates the two cases: a version already on the index is a benign skip that keeps re-runs idempotent, and any other failure fails the release. Publishing the root crate while a bumped subcrate failed would putcachedon the index depending on acached_proc_macro*version that does not exist.Notes
Cargo.tomlis at3.0.0-rc.10, which is already on crates.io, soshould_publishis false.workflow_dispatchis unchanged and still bypasses the check, which is what recovered rc.10.