ci: split release-please into independent release and PR creation steps#378
Closed
ci: split release-please into independent release and PR creation steps#378
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 #377. |
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
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-please-actioninvocation in therelease-packagejob into two independent passes:skip-github-pull-request: true): Attempts to create a GitHub release only. If a release is created, the workflow checks out the repo and pushes the tag explicitly (with an idempotency guard).skip-github-release: true): Only runs if no release was created in pass 1. Handles release PR creation/maintenance.This separation is required because release-please checks for existing tags when deciding whether a release PR is still needed. Without the split, release-please could open a duplicate PR immediately after publishing a release because the tag wasn't yet present.
Tag names are passed through
envvariables (not inline${{ }}expansion) to avoid script injection.Describe alternatives you've considered
A single
release-please-actioncall (the current approach) works until GitHub's immutable releases feature is enabled, at which point the race between tag creation and PR evaluation causes duplicate PRs.Additional context
build-ruby-gem,build-jruby-gem,publish) — they continue to gate onrelease-package.outputs.release-created.16a9c90856f42705d54a6fda1823352bdc62cf38) is unchanged.release-prsstep ID on the second call is intentionally different fromreleaseto avoid output collisions.Link to Devin session: https://app.devin.ai/sessions/7d5bda4d9dbe4ae0b950b30a50485e60
Requested by: @keelerm84
Note
Medium Risk
Changes the release workflow control flow by separating release creation, manual tag pushing, and PR maintenance; misconfiguration could affect tagging/release automation on
main. Limited scope to CI workflow logic only.Overview
Updates
.github/workflows/release-please.ymlto runrelease-pleasein two passes: first to create GitHub releases without opening PRs, and (only when a release is created) check out the repo and create/push the corresponding git tag with an idempotency check.If no release is created, the workflow runs a second
release-pleaseinvocation configured to only manage release PRs (skipping GitHub release creation), avoiding duplicate PRs when tags are created after the release.Reviewed by Cursor Bugbot for commit 05369cc. Bugbot is set up for automated code reviews on this repo. Configure here.