Skip to content

Add PR-gated release workflow to v3, matching master - #681

Merged
fantkolja merged 1 commit into
v3from
feature/hzc-0000-v3-release-workflow
Sep 24, 2026
Merged

fantkolja merged 1 commit into
v3from
feature/hzc-0000-v3-release-workflow

Conversation

@fantkolja

@fantkolja fantkolja commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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 Make release workflows branch-agnostic to support releasing from v3 #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 Fix pagination footer total under manual pagination #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.ai/code/session_017KZ4BwmV36thDKYibkbaty

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
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>
@fantkolja
fantkolja merged commit f577ebc into v3 Sep 24, 2026
2 checks passed
@fantkolja
fantkolja deleted the feature/hzc-0000-v3-release-workflow branch September 24, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant