Skip to content

ci: switch release workflow to staged npm publishing#693

Merged
stijnvanhulle merged 3 commits into
mainfrom
claude/plugin-release-scripts-6q5nww
Jul 15, 2026
Merged

ci: switch release workflow to staged npm publishing#693
stijnvanhulle merged 3 commits into
mainfrom
claude/plugin-release-scripts-6q5nww

Conversation

@stijnvanhulle

Copy link
Copy Markdown
Contributor

🎯 Changes

Ports kubb-labs/kubb's staged-publish + approval-gated promote flow to this repo, replacing direct changeset publish. A new version now sits unreleased on npm until a maintainer runs npm stage approve and approves the promote job's GitHub Environment review, at which point the version is verified live on npm, tagged, and released.

The one deliberate difference from kubb: packages here version and changelog independently (fixed: [] / linked: [] in .changeset/config.json, unchanged), so promote creates one GitHub Release per staged package (tag <name>@<version>, notes from that package's own CHANGELOG.md), instead of kubb's single combined release for a shared version.

  • Added scripts/release.mjs (drives pnpm stage publish -r), scripts/verifyRegistry.mjs (confirms staged versions are actually live on npm before promoting), and scripts/createReleases.mjs (creates one GitHub Release per staged package), ported from kubb-labs/kubb and adapted for independent versioning.
  • Restructured .github/workflows/release.yml into a release job (build/test, stage-publish via scripts/release.mjs, canary fallback) and a new promote job gated by the npm-release-approval GitHub Environment (verify → tag → create releases). deploy-platform now fires only after promote approves.
  • Removed the stale release / release:canary / release:stage scripts from every packages/*/package.json, the matching turbo.json tasks, the root release:stage(:ci) scripts, and .github/canary.sh — these predated staging and release:canary referenced a scripts/build.js that no longer exists in the repo.
  • Added a "Releasing" section to CONTRIBUTING.md documenting the new flow for maintainers.

Prerequisite outside this PR: the npm-release-approval GitHub Environment must be created on this repo (Settings → Environments) with the right reviewers, same as it exists on kubb-labs/kubb, before the promote job can run.

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm run test.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is for the docs (no release).

Generated by Claude Code

Port kubb-labs/kubb's staged-publish + approval-gated promote flow so a new
version isn't installable until a maintainer approves it on npm and on the
npm-release-approval GitHub environment. Unlike kubb, packages here version
and changelog independently, so promotion creates one GitHub Release per
staged package instead of one combined release.

Also removes the per-package release/release:canary/release:stage scripts
and turbo tasks, which predated staging and referenced a scripts/build.js
that no longer exists.
@codesandbox

codesandbox Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot

changeset-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 26d9247

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 14, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 14, 2026

Copy link
Copy Markdown
More templates

@kubb/plugin-axios

npm i https://pkg.pr.new/@kubb/plugin-axios@693

@kubb/plugin-cypress

npm i https://pkg.pr.new/@kubb/plugin-cypress@693

@kubb/plugin-faker

npm i https://pkg.pr.new/@kubb/plugin-faker@693

@kubb/plugin-fetch

npm i https://pkg.pr.new/@kubb/plugin-fetch@693

@kubb/plugin-mcp

npm i https://pkg.pr.new/@kubb/plugin-mcp@693

@kubb/plugin-msw

npm i https://pkg.pr.new/@kubb/plugin-msw@693

@kubb/plugin-react-query

npm i https://pkg.pr.new/@kubb/plugin-react-query@693

@kubb/plugin-redoc

npm i https://pkg.pr.new/@kubb/plugin-redoc@693

@kubb/plugin-swr

npm i https://pkg.pr.new/@kubb/plugin-swr@693

@kubb/plugin-ts

npm i https://pkg.pr.new/@kubb/plugin-ts@693

@kubb/plugin-vue-query

npm i https://pkg.pr.new/@kubb/plugin-vue-query@693

@kubb/plugin-zod

npm i https://pkg.pr.new/@kubb/plugin-zod@693

commit: 26d9247

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 290 kB

ℹ️ View Unchanged
Filename Size
packages/plugin-axios/dist/index.cjs 14.1 kB
packages/plugin-axios/dist/index.js 13.6 kB
packages/plugin-axios/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-cypress/dist/index.cjs 5.06 kB
packages/plugin-cypress/dist/index.js 4.99 kB
packages/plugin-cypress/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-faker/dist/index.cjs 13.6 kB
packages/plugin-faker/dist/index.js 13.5 kB
packages/plugin-faker/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-fetch/dist/index.cjs 14.1 kB
packages/plugin-fetch/dist/index.js 13.6 kB
packages/plugin-fetch/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-mcp/dist/index.cjs 9.43 kB
packages/plugin-mcp/dist/index.js 8.95 kB
packages/plugin-mcp/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-msw/dist/index.cjs 5.33 kB
packages/plugin-msw/dist/index.js 5.24 kB
packages/plugin-msw/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-react-query/dist/index.cjs 16.9 kB
packages/plugin-react-query/dist/index.js 16.4 kB
packages/plugin-react-query/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-redoc/dist/index.cjs 2.21 kB
packages/plugin-redoc/dist/index.js 1.75 kB
packages/plugin-redoc/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-swr/dist/index.cjs 11.1 kB
packages/plugin-swr/dist/index.js 10.6 kB
packages/plugin-swr/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-ts/dist/index.cjs 23.2 kB
packages/plugin-ts/dist/index.js 22.5 kB
packages/plugin-ts/dist/rolldown-runtime-CNktS9qV.js 291 B
packages/plugin-vue-query/dist/index.cjs 14 kB
packages/plugin-vue-query/dist/index.js 13.5 kB
packages/plugin-vue-query/dist/rolldown-runtime-C0LytTxp.js 168 B
packages/plugin-zod/dist/index.cjs 17.1 kB
packages/plugin-zod/dist/index.js 16.9 kB
packages/plugin-zod/dist/rolldown-runtime-C0LytTxp.js 168 B

compressed-size-action

claude and others added 2 commits July 14, 2026 20:58
Port internals/changelog/format.mjs so scripts/createReleases.mjs can stay a
verbatim copy of kubb's, gated by the same RELEASE_MODE env var, instead of
a separately maintained per-package-only fork. This repo never sets
RELEASE_MODE=combined, so the effective behavior (one release per staged
package) is unchanged.
@stijnvanhulle stijnvanhulle merged commit f2f556e into main Jul 15, 2026
14 of 15 checks passed
@stijnvanhulle stijnvanhulle deleted the claude/plugin-release-scripts-6q5nww branch July 15, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants