Repository navigation
fix: make release creation safe to rerun - #614
Merged
vladimirrott merged 2 commits intoOct 19, 2026
Merged
Conversation
This was referenced Oct 19, 2026
vladimirrott
approved these changes
Oct 19, 2026
vladimirrott
left a comment
Member
There was a problem hiding this comment.
Thanks, @Humerous. This is the fix #554 asked for, and the lookup is three-way, which is the part that's easy to get wrong: release exists → skip, release not found → create, anything else → ::error:: and exit 1. A 401 or a network failure stops the job instead of falling through to a create.
Reviewed at 5ce1f05. What I checked:
- The workflow diff adds no
${{ }}insiderun:, no new actions, no permission or trigger change.VERSIONandREPOstill arrive throughenv:. release not foundis the exact string gh prints (ErrReleaseNotFoundin gh'spkg/cmd/release/shared/fetch.go), and a read-onlygh release viewof a missing tag printed it.- Reverting the
release.ymlhunk to the old unguardedgh release createturnsrelease-create-rerun.test.shred, and so does short-circuiting the existence check (the merge receipt).check_test_reachability.shpasses with the newci.ymlstep. - I also ran the shipped
run:block underbash -ewith a fakegh: exists creates 0, missing creates 1, auth error and network error both exit 1 and create 0.
Two optional notes, neither blocking:
gh release viewalso finds drafts, so a draft with the same tag would receive the assets and stay unpublished. Only someone withcontents: writecan make one, so it's a maintainer-tier edge.--json isDraftwould close it if you want to.- The test checks the step's shape with strict regexes. It fails safe on a reformat, and a fake-
ghbehavioural test would be sturdier later.
For a next one in the same file family: #622. cargo audit only runs on push, so last week main sat on four rustls advisories for about 38 hours before any run noticed. It's one scheduled workflow modelled on npm-audit.yml plus a YAML contract test like the one you just wrote. I'll offer it on the issue once this lands.
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.
Closes #554
Summary
Validation