Fix GitHub release creation#7651
Open
dmerand wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the release GitHub Actions workflow to create (and reconcile on reruns) GitHub Releases using the Releases REST API via gh api, preserving the make_latest=legacy behavior that is no longer supported by gh release create.
Changes:
- Replace
gh release create --latest=legacywith agh apiPOST torepos/{repo}/releasesusingmake_latest=legacy. - Make workflow reruns converge by PATCHing an existing release to
make_latest=legacywhen the release already exists.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
gh release create --latest=legacywith a REST API call because the installedghtreats--latestas a boolean flagmake_latest=legacyrelease behavior throughgh apimake_latest=legacyinstead of skipping itWhy
The
Releaseworkflow published4.1.0, created the4.1.0tag, and createdstable/4.1, but failed while creating the GitHub release:gh release createno longer accepts--latest=legacy; that value is only available through the Releases REST API asmake_latest=legacy.Testing
git diff --checkCreate GitHub releaseshell block and ranbash -ngh release view --json databaseIdworks against the existing4.1.0releaseNotes
This intentionally does not re-run the live release creation locally. The new step is written to be safe on workflow reruns: if the release already exists, it reconciles
make_latest=legacyvia PATCH and exits successfully.