Repository navigation
Make release workflows branch-agnostic to support releasing from v3 - #680
Merged
fantkolja merged 1 commit intoSep 24, 2026
Merged
Conversation
prepare-release.yml and release.yml hardcoded `master` as the base branch and npm publish always used the `canary` dist-tag. Generalize both so they work when dispatched against v3 too: base branch and Chromatic baseBranch now follow the triggering ref, the publish step picks `canary` for master and `latest` for v3 (matching the current npm dist-tags), and the release trigger now also listens on v3. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017KZ4BwmV36thDKYibkbaty
3 tasks
fantkolja
deleted the
feature/hzc-0000-enable-release-from-older-branch
branch
September 24, 2026 12:46
fantkolja
added a commit
that referenced
this pull request
Sep 24, 2026
## Summary - `v3` has been releasing via a single workflow (`release.yml`, "manual release") that bumps the version, pushes the commit directly to `v3`, and runs `npm publish` unconditionally. That only worked because `v3` had no branch protection. - Replaces it with the same two-step flow `master` uses: `prepare-release.yml` (new) opens a version-bump PR with auto-merge enabled, and `release.yml` publishes once it's approved and merged — tagging with npm's `latest` dist-tag, since `v3` is the current stable line (`canary` is reserved for `master`/v4 prereleases). Companion PR #680 makes those two files branch-agnostic on `master`'s side. - Adds `.github/CODEOWNERS` so the new PR review requirement has an owner to route to. - Fixes `pull-request.yml`, whose `branches: [master]` filter meant CI (`lint`/`test`) silently never ran on PRs targeting `v3` — only the CLA check did (verified against open PR #676). Branch protection on `v3` (require PR + 1 code owner approval, no force-push/deletion — matching `master`) has already been enabled via the API, so this PR itself needed a review to merge. ## Test plan - [ ] YAML validated (`js-yaml` parse) — done locally - [ ] Confirm CI now runs on this PR (previously only the CLA check fired for `v3`-targeted PRs) - [ ] After merge, dry-run `prepare-release.yml` via `workflow_dispatch` on `v3` and confirm it opens a release PR 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
prepare-release.ymlandrelease.ymlhardcodedmasteras the base branch andnpm publish --tag canaryunconditionally.v3too: the release PR's base branch and Chromatic'sbaseBranchnow follow the triggering ref, and the npm publish tag is picked dynamically (canaryformaster,latestforv3, matching the current npm dist-tags:latest→3.0.13,canary→4.0.1-canary.19).v3ports the matchingprepare-release.yml/release.ymlthere (replacing its old direct-push workflow) plus branch protection, since this repo's workflow files are read per-branch.Test plan
js-yamlparse) — done locallyprepare-release.ymlviaworkflow_dispatchonmasterto confirm the canary flow is unaffectedprepare-release.ymlonv3and confirm the release PR opens againstv3and publishes with--tag latest🤖 Generated with Claude Code
https://claude.ai/code/session_017KZ4BwmV36thDKYibkbaty