Skip to content

Mark new releases as pre-release and suppress auto-latest promotion#23754

Merged
pelikhan merged 1 commit intomainfrom
copilot/update-release-md-pre-release
Mar 31, 2026
Merged

Mark new releases as pre-release and suppress auto-latest promotion#23754
pelikhan merged 1 commit intomainfrom
copilot/update-release-md-pre-release

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

New releases were automatically marked as the latest release, requiring manual intervention to revert. Releases should be pre-release by default; a maintainer explicitly promotes one to latest.

Changes

  • release.md: Added --prerelease and --latest=false to gh release create, so every automated release is created as a pre-release without becoming the latest.
  • release.lock.yml: Recompiled to reflect the above change.
gh release create "$RELEASE_TAG" \
  dist/* \
  --title "$RELEASE_TAG" \
  --generate-notes \
  --prerelease \
  --latest=false

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ae85a74a-aacb-47c9-a406-fb7d895863c7

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review March 31, 2026 17:10
Copilot AI review requested due to automatic review settings March 31, 2026 17:10
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 automated release workflow to prevent newly created releases from being promoted to “Latest” by default, requiring maintainers to explicitly promote a release when appropriate.

Changes:

  • Add --prerelease to automated gh release create calls so releases are created as pre-releases by default.
  • Add --latest=false to suppress automatic “latest release” promotion.
  • Recompile the generated workflow lockfile to reflect the template change.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release.md Updates the gh release create invocation to create pre-releases and avoid latest promotion.
.github/workflows/release.lock.yml Regenerates the locked workflow, carrying the updated gh release create flags through to the runnable workflow.

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

Comment on lines 269 to +275
# Create release with binaries (SBOM files will be added later)
gh release create "$RELEASE_TAG" \
dist/* \
--title "$RELEASE_TAG" \
--generate-notes
--generate-notes \
--prerelease \
--latest=false
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

The workflow relies on the GitHub-hosted runner’s preinstalled gh CLI, but gh release create --latest=false requires a gh version that supports the --latest flag for releases. To avoid the release job breaking if the runner image lags/changes, pin/install a known compatible gh version (or add an explicit version check/fallback) before invoking gh release create.

Copilot uses AI. Check for mistakes.
Comment on lines 1343 to +1349
# Create release with binaries (SBOM files will be added later)
gh release create "$RELEASE_TAG" \
dist/* \
--title "$RELEASE_TAG" \
--generate-notes
--generate-notes \
--prerelease \
--latest=false
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

gh release create --latest=false depends on a gh CLI version that includes the --latest option; since the workflow doesn’t pin/install gh, this can fail if the runner image’s gh version changes. Consider pinning/installing a specific gh version (or validating gh --version) before creating the release.

Copilot uses AI. Check for mistakes.
@pelikhan pelikhan merged commit 3803e52 into main Mar 31, 2026
67 checks passed
@pelikhan pelikhan deleted the copilot/update-release-md-pre-release branch March 31, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants