ci: harden publish workflow (idempotent, checkout v5) - #5
Merged
Conversation
Skip auth+publish when the tag's version is already on crates.io (query the crates.io API), so a manual publish followed by a tag push — or a re-pushed tag — no-ops green instead of failing at 'already uploaded'. Bump actions/checkout v4 -> v5 to clear the Node 20 deprecation warning.
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.
Follow-up to the automated-publishing setup.
crate version already uploaded— which is exactly the red X the v0.2.0 tag produced.Node.js 20 is deprecatedannotation on the runner.Cargo.toml) and Trusted Publishing (OIDC, no stored token) are unchanged.Dynamic values use the safe pattern throughout (env vars, quoted expansions; no untrusted input interpolated into
runscripts).First live exercise is the next real release (0.3.0); 0.2.0 already exists, so if this workflow re-ran on
v0.2.0now it would take the new skip path and go green.