ci: split release-please into independent release and PR creation steps#20
Closed
keelerm84 wants to merge 2 commits into
Closed
ci: split release-please into independent release and PR creation steps#20keelerm84 wants to merge 2 commits into
keelerm84 wants to merge 2 commits into
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
|
Closing: The split release-please pattern is only needed for repos with artifact uploads. This attestation-only repo doesn't need it. The attestation changes are in PR #19. |
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.
Requirements
N/A — CI-only workflow change, no application code or tests affected.
Related issues
Follows the pattern established in ld-relay PR #622 to support GitHub's immutable releases.
Describe the solution you've provided
Splits the single
release-packagejob into two jobs to decouple release creation from PR management:release-pleasejob — Runs release-please in two passes:skip-github-pull-request: true): Creates a GitHub release if one is pending. If created, checks out the repo and pushes the tag (with an idempotent guard).skip-github-release: true): Only runs if no release was created; handles release PR creation/updates.release-packagejob — Now depends onrelease-pleaseand is gated onreleases_created == 'true'. Individual step-levelifguards are removed since the job itself only runs on release.This two-pass approach ensures the tag exists before release-please evaluates whether a new release PR is needed, preventing duplicate PRs.
Describe alternatives you've considered
A single-pass approach where release-please handles both releases and PRs simultaneously — this is the current behavior and causes issues with GitHub's immutable releases because the tag may not exist when release-please checks PR state.
Additional context
Things for reviewers to verify:
release-pleasejob outputsreleases_created(plural) for the downstream job gate, but the inline tag-creation conditions userelease_created(singular). Both are valid release-please outputs; for this single-package repo they should be equivalent, but confirm this is intentional.release-packagejob no longer haspull-requests: writepermission (previously needed because release-please ran in that job). Confirm no downstream composite action requires it.16a9c90856f42705d54a6fda1823352bdc62cf38is unchanged; the version comment was updated from# v4to# v4.4.0.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84
Note
Medium Risk
Changes the release automation workflow by adding manual tag creation and new job gating, which could impact whether releases/tags/PRs are created correctly. No application code changes, but misconfiguration could break publishing.
Overview
Splits the GitHub Actions release flow into two jobs so release creation/tagging is separated from release PR management.
A new
release-pleasejob runsrelease-pleasein two passes: first to create a GitHub release (skipping PRs), then—only if no release was created—to manage release PRs (skipping releases). When a release is created, the workflow now checks out the repo and creates/pushes the release tag idempotently.release-packagenow depends onrelease-pleaseand only runs whenrelease_createdis true, removing the prior step-levelifguards and droppingpull-requests: writepermissions from the packaging job.Reviewed by Cursor Bugbot for commit f144b07. Bugbot is set up for automated code reviews on this repo. Configure here.