Automate tag, stable branch, and GitHub release after changeset publish#7415
Merged
isaacroldan merged 1 commit intomainfrom Apr 28, 2026
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
cde7405 to
854615f
Compare
4 tasks
Adds five steps to the changeset-release job in release.yml that run after `pnpm release latest` succeeds: 1. Get version — reads packages/cli/package.json 2. Create tag — bare X.Y.Z, idempotent 3. Create stable branch — only on main with a minor/major bump, idempotent 4. Build release notes — from the .changeset/*.md files consumed by the Version Packages merge, with PR + author resolved by walking main's first-parent history and reading the merge subject 5. Create GitHub release — reads notes from the file written in step 4, --latest=legacy lets GitHub assign the badge by semver Release notes are scoped to changesets only — anything without a changeset is excluded by construction. Each step is independently idempotent, so re-running the workflow recovers from partial failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
854615f to
fb9e6f5
Compare
5 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR automates post-publish GitHub repository housekeeping in the existing changeset-release workflow: creating a git tag, optionally creating a stable/X.Y branch on main for .0 releases, and creating a GitHub release (empty body) after pnpm release latest succeeds.
Changes:
- Derive the released CLI version from
packages/cli/package.jsonafter publish. - Create and push a git tag named
X.Y.Zif it doesn’t already exist remotely. - On
mainfor.0releases, create astable/X.Ybranch if it doesn’t already exist remotely. - Create a GitHub release for the tag (empty notes) if it doesn’t already exist.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Automates the post-merge steps that currently happen by hand after a "Version Packages" PR merges. After
pnpm release latestsucceeds, the new steps:X.Y.Z)mainwith a minor/major bump (X.Y.0), create thestable/X.Ybranch/write_release_descriptions, which overwrites the body afterwards.Each operation checks remote state first and skips if already done, so re-running the workflow recovers cleanly from partial failures. The
--latest=legacyflag lets GitHub assign the latest badge via semver comparison, so a patch on the current stable still gets it.Follow-ups (separate PRs):
.github/release.ymlto make--generate-notesproduce useful flat notes by default.mainafter release (Automatically unlock main branch after release publishes #7416).bin/post-release(homebrew/docs/notification PRs) — needs extra auth.Test plan
GITHUB_TOKENfrom pushing tagsstable/*branches🤖 Generated with Claude Code