Repository navigation
Release workflow: update an existing release instead of failing - #24
Merged
Merged
Conversation
gh release create returns 422 when the release already exists (made by hand or by an earlier run). Edit its title and notes from CHANGELOG.md in that case. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UB8ouAGs45EfpwJjttj6yY
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
The
Releaseruns forv2.0.0andv2.1.0failed at "Publish the release" withHTTP 422: Release.tag_name already exists: the releases had been created by hand a couple of seconds before the workflow reachedgh release create.Change
Make the publish step idempotent: if
gh release viewfinds a release for the tag, rungh release editwith the title and the CHANGELOG notes; otherwisegh release create ... --verify-tagas before.Only
.github/workflows/release.ymlchanges.Notes
v2.0.0currently points at the 2.1.0 merge commit instead ofafffdd8; that is a tag fix, not part of this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01UB8ouAGs45EfpwJjttj6yY
Generated by Claude Code