Skip to content

Add workflow to promote a release to latest/non-prerelease#23811

Merged
pelikhan merged 1 commit intomainfrom
copilot/create-github-action-workflow
Apr 1, 2026
Merged

Add workflow to promote a release to latest/non-prerelease#23811
pelikhan merged 1 commit intomainfrom
copilot/create-github-action-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

Adds a manually-triggered workflow to clear the prerelease flag on a release and mark it as the repository's latest.

.github/workflows/promote-release.yml

  • Fork guard — job-level if: !github.event.repository.fork blocks execution on forks
  • Permission checkgetCollaboratorPermissionLevel must return admin or maintain; fails otherwise
  • Release validationgetReleaseByTag confirms the tag exists and is not a draft
  • PromotionupdateRelease with prerelease: false + make_latest: 'true'; emits an info notice (not a failure) if the release was already non-prerelease, since make_latest is still meaningful

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/a88cf037-fb19-4218-bb02-ea4e04c179b6

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review April 1, 2026 03:25
Copilot AI review requested due to automatic review settings April 1, 2026 03:25
@pelikhan pelikhan merged commit b9cec0b into main Apr 1, 2026
1 check passed
@pelikhan pelikhan deleted the copilot/create-github-action-workflow branch April 1, 2026 03:25
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

Adds a manually-triggered GitHub Actions workflow that promotes an existing, published (non-draft) release tag to become the repository’s “latest” release while clearing the prerelease flag.

Changes:

  • Introduces a workflow_dispatch workflow that accepts a version (tag) input.
  • Adds an actor permission gate (admin/maintain) plus a fork guard.
  • Validates the target release exists and is not a draft, then updates it to prerelease: false and make_latest: 'true'.

💡 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants