ci: add pre-release workflow triggered by label on release-please PR#52
Merged
Conversation
Adds a workflow that creates GitHub pre-releases when the 'pre-release' label is added to the release-please PR. Automatically determines the version from the PR title and increments the RC number (e.g. v1.9.0-rc.1, v1.9.0-rc.2). The pre-release is created from main, marked as pre-release (hidden from Latest), and a comment is posted on the PR with a download link. The label is auto-removed so it can be re-added for subsequent RCs.
Cliffback
added a commit
that referenced
this pull request
May 20, 2026
Split the pre-release workflow into 'check' and 'build' jobs. The 'check' job handles version extraction, RC numbering, and duplicate detection. If the current HEAD matches the last RC's commit, it posts a skip comment and exits cleanly. The 'build' job only runs when there are new changes to release. This fixes the bug where subsequent steps would continue running even after the skip check detected a duplicate. Also preserves the release notes extraction from PR #52.
Cliffback
added a commit
that referenced
this pull request
May 20, 2026
Split the pre-release workflow into 'check' and 'build' jobs. The 'check' job handles version extraction, RC numbering, and duplicate detection. If the current HEAD matches the last RC's commit, it posts a skip comment and exits cleanly. The 'build' job only runs when there are new changes to release. This fixes the bug where subsequent steps would continue running even after the skip check detected a duplicate. Also preserves the release notes extraction from PR #52.
Cliffback
added a commit
that referenced
this pull request
May 20, 2026
* ci: prevent duplicate pre-releases from the same commit Adds a deduplication check to the pre-release workflow. Before building, compare the current HEAD commit against the latest RC tag for this version. If they match, skip the release and post a comment explaining why. This prevents wasteful rc.2, rc.3, etc. when the label is added multiple times without new commits landing on main. * refactor: restructure pre-release workflow into two jobs Split the pre-release workflow into 'check' and 'build' jobs. The 'check' job handles version extraction, RC numbering, and duplicate detection. If the current HEAD matches the last RC's commit, it posts a skip comment and exits cleanly. The 'build' job only runs when there are new changes to release. This fixes the bug where subsequent steps would continue running even after the skip check detected a duplicate. Also preserves the release notes extraction from PR #52.
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
Adds a GitHub Actions workflow that creates pre-releases from
mainwhen thepre-releaselabel is added to the release-please PR.How it works
Release-please has an open PR (e.g.
chore(main): release 1.9.0)Add the
pre-releaselabel to that PRThe workflow:
1.9.0)v1.9.0-rc.*tags and increments (rc.1,rc.2, ...)main**v1.9.0-rc.1**)v1.9.0-rc.1with the same curated changelog as the final release (hidden from Latest)pre-releaselabelPush more changes to
main, add label again ->v1.9.0-rc.2When ready, merge the release-please PR -> stable
v1.9.0release as normalDetails
pull_requestlabeledevent, filtered topre-releaselabel + release-please branch