Automate patch release post-publish steps#7308
Draft
alfonso-noriega wants to merge 1 commit intohomebrew-versioned-formulasfrom
Draft
Automate patch release post-publish steps#7308alfonso-noriega wants to merge 1 commit intohomebrew-versioned-formulasfrom
alfonso-noriega wants to merge 1 commit intohomebrew-versioned-formulasfrom
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
20f81b0 to
2a9f602
Compare
4 tasks
2a9f602 to
8277e5f
Compare
After CI publishes a patch to npm on a stable branch, automatically: - Create and push the git tag - Create the GitHub Release pointing to the CHANGELOG - Open Homebrew and docs PRs via pnpm post-release post-release changes: - Skip dev auth and git status checks when running in CI - Add --skip-notification flag (patches do not send notifications)
8277e5f to
9f5a1a8
Compare
a573648 to
2ac3237
Compare
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.

WHY are these changes introduced?
Patch releases currently require several manual steps after CI publishes to npm: creating the git tag, opening the GitHub Release, and running `pnpm post-release`. These are mechanical and can be automated, reducing the patch release process to just two human decisions: the cherry-pick PR review and the Homebrew/docs PR review.
WHAT is this pull request doing?
`bin/post-release`:
`.github/workflows/release.yml`:
Adds two steps after publish that only fire on `stable/*` branches:
Updated patch release steps
Before (7 steps):
After (4 steps):
CI publishes to npm, creates the git tag, opens the GitHub Release, and opens the Homebrew and docs PRs automatically.How to test
The workflow steps can only be fully exercised by a real publish on a stable branch. However:
Test `post-release` changes locally:
Verify the CI path skips the `dev` auth check and notification PR:
```bash
From a stable branch, with a clean or dirty working directory:
CI=true pnpm post-release --skip-notification
Expected: skips git status check, skips dev auth check, skips notification PR, opens Homebrew + docs PRs
```
Verify the flag is required to suppress the notification (i.e. without the flag it still creates it):
```bash
CI=true pnpm post-release
Expected: opens Homebrew + docs + notification PRs
```
Verify the workflow condition logic:
The two new steps only fire when both conditions are true:
You can verify this by triggering the workflow manually on `main` after a publish and confirming the new steps are skipped.
End-to-end test:
Cherry-pick a trivial fix to `stable/X.Y` with a `patch` changeset, merge the resulting "Version Packages" PR, and confirm CI creates the tag, GitHub Release, and Homebrew/docs PRs without manual intervention.