Repository navigation
Add PR-gated release workflow to v3, matching master - #681
Merged
Merged
Conversation
v3 has been releasing via a single workflow that pushes the version bump commit directly to v3 and runs `npm publish` unconditionally. That only worked because v3 had no branch protection. Switch to the same two-step flow master uses: `prepare-release.yml` opens a version- bump PR (auto-merge enabled) and `release.yml` publishes once it's approved and merged, tagging with the npm `latest` dist-tag (v3 is the current stable line; `canary` is reserved for master/v4 prereleases). Also add CODEOWNERS so the new PR review requirement (added by a matching branch-protection change) has an owner to route to, and fix pull-request.yml, whose `branches: [master]` filter meant CI never actually ran on PRs targeting v3. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KZ4BwmV36thDKYibkbaty
3 tasks
fantkolja
added a commit
that referenced
this pull request
Sep 24, 2026
…680) ## Summary - `prepare-release.yml` and `release.yml` hardcoded `master` as the base branch and `npm publish --tag canary` unconditionally. - Generalizes both so they work when dispatched against `v3` too: the release PR's base branch and Chromatic's `baseBranch` now follow the triggering ref, and the npm publish tag is picked dynamically (`canary` for `master`, `latest` for `v3`, matching the current npm dist-tags: `latest` → `3.0.13`, `canary` → `4.0.1-canary.19`). - Companion PR #681 on `v3` ports the matching `prepare-release.yml`/`release.yml` there (replacing its old direct-push workflow) plus branch protection, since this repo's workflow files are read per-branch. ## Test plan - [ ] YAML validated (`js-yaml` parse) — done locally - [ ] Dry-run `prepare-release.yml` via `workflow_dispatch` on `master` to confirm the canary flow is unaffected - [ ] After #681 lands, dry-run `prepare-release.yml` on `v3` and confirm the release PR opens against `v3` and publishes with `--tag latest` 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017KZ4BwmV36thDKYibkbaty Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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
v3has been releasing via a single workflow (release.yml, "manual release") that bumps the version, pushes the commit directly tov3, and runsnpm publishunconditionally. That only worked becausev3had no branch protection.masteruses:prepare-release.yml(new) opens a version-bump PR with auto-merge enabled, andrelease.ymlpublishes once it's approved and merged — tagging with npm'slatestdist-tag, sincev3is the current stable line (canaryis reserved formaster/v4 prereleases). Companion PR Make release workflows branch-agnostic to support releasing from v3 #680 makes those two files branch-agnostic onmaster's side..github/CODEOWNERSso the new PR review requirement has an owner to route to.pull-request.yml, whosebranches: [master]filter meant CI (lint/test) silently never ran on PRs targetingv3— only the CLA check did (verified against open PR Fix pagination footer total under manual pagination #676).Branch protection on
v3(require PR + 1 code owner approval, no force-push/deletion — matchingmaster) has already been enabled via the API, so this PR itself needed a review to merge.Test plan
js-yamlparse) — done locallyv3-targeted PRs)prepare-release.ymlviaworkflow_dispatchonv3and confirm it opens a release PR againstv3and publishes with--tag latest🤖 Generated with Claude Code
https://claude.ai/code/session_017KZ4BwmV36thDKYibkbaty