Skip to content

Fix GitHub release creation#7651

Open
dmerand wants to merge 1 commit into
mainfrom
donald/fix-release-gh-latest-legacy
Open

Fix GitHub release creation#7651
dmerand wants to merge 1 commit into
mainfrom
donald/fix-release-gh-latest-legacy

Conversation

@dmerand
Copy link
Copy Markdown
Contributor

@dmerand dmerand commented May 27, 2026

Summary

  • replace gh release create --latest=legacy with a REST API call because the installed gh treats --latest as a boolean flag
  • preserve GitHub's make_latest=legacy release behavior through gh api
  • make reruns converge by PATCHing an existing release to make_latest=legacy instead of skipping it

Why

The Release workflow published 4.1.0, created the 4.1.0 tag, and created stable/4.1, but failed while creating the GitHub release:

invalid argument "legacy" for "--latest" flag: strconv.ParseBool: parsing "legacy": invalid syntax

gh release create no longer accepts --latest=legacy; that value is only available through the Releases REST API as make_latest=legacy.

Testing

  • git diff --check
  • extracted the Create GitHub release shell block and ran bash -n
  • verified gh release view --json databaseId works against the existing 4.1.0 release

Notes

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=legacy via PATCH and exits successfully.

@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label May 27, 2026
@dmerand dmerand marked this pull request as ready for review May 27, 2026 16:57
@dmerand dmerand requested a review from a team as a code owner May 27, 2026 16:57
Copilot AI review requested due to automatic review settings May 27, 2026 16:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=legacy with a gh api POST to repos/{repo}/releases using make_latest=legacy.
  • Make workflow reruns converge by PATCHing an existing release to make_latest=legacy when the release already exists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants