Skip to content

ci: add pre-release workflow triggered by label on release-please PR#52

Merged
Cliffback merged 1 commit into
mainfrom
ci/pre-release
May 20, 2026
Merged

ci: add pre-release workflow triggered by label on release-please PR#52
Cliffback merged 1 commit into
mainfrom
ci/pre-release

Conversation

@Cliffback

@Cliffback Cliffback commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a GitHub Actions workflow that creates pre-releases from main when the pre-release label is added to the release-please PR.

How it works

  1. Release-please has an open PR (e.g. chore(main): release 1.9.0)

  2. Add the pre-release label to that PR

  3. The workflow:

    • Extracts the version from the PR title (1.9.0)
    • Finds existing v1.9.0-rc.* tags and increments (rc.1, rc.2, ...)
    • Builds the plugin from main
    • Fetches the clean changelog from the release-please PR body (strips the "beep boop" boilerplate)
    • Prepends the RC tag (e.g. **v1.9.0-rc.1**)
    • Creates a GitHub pre-release tagged v1.9.0-rc.1 with the same curated changelog as the final release (hidden from Latest)
    • Posts/updates a comment on the PR with the download link
    • Auto-removes the pre-release label
  4. Push more changes to main, add label again -> v1.9.0-rc.2

  5. When ready, merge the release-please PR -> stable v1.9.0 release as normal

Details

  • Trigger: pull_request labeled event, filtered to pre-release label + release-please branch
  • Pre-release: Marked as pre-release in GitHub (hidden from Latest release)
  • Changelog: Extracted from the release-please PR body — identical to the final release notes, with RC tag prepended
  • Comment: Single updating comment (no spam)
  • Label cleanup: Auto-removed after build

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 Cliffback merged commit 8ea478d into main May 20, 2026
7 checks passed
@Cliffback Cliffback deleted the ci/pre-release branch May 20, 2026 18:47
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.
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.

1 participant