Skip to content

Add release and promote actions for the shared changesets release flow - #20

Merged
stijnvanhulle merged 1 commit into
mainfrom
claude/move-script-kubb-labs-config-tq7erw
Jul 15, 2026
Merged

Add release and promote actions for the shared changesets release flow#20
stijnvanhulle merged 1 commit into
mainfrom
claude/move-script-kubb-labs-config-tq7erw

Conversation

@stijnvanhulle

Copy link
Copy Markdown
Contributor

Summary

  • kubb-labs/kubb and kubb-labs/plugins each carried a byte-for-byte identical trio of release scripts (scripts/release.mjs, scripts/createReleases.mjs, scripts/verifyRegistry.mjs) implementing the stage → promote → verify-on-npm → tag → create-GitHub-release flow used by both repos' release.yml.
  • Adds two composite actions here so both repos consume one copy instead of two:
    • .github/actions/release wraps the changesets/action call (version + stage-publish via the bundled release.mjs), exposing staged/staged_packages outputs.
    • .github/actions/promote wraps the verify-on-npm / tag / create-GitHub-release sequence (bundling verifyRegistry.mjs, createReleases.mjs, and the format.mjs regex-helper it depends on), exposing an approved output.
  • Adds a minimal package.json + vitest + a test.yml workflow so this repo can run the moved test suite (previously there was no package.json or CI test workflow here at all).

Why composite actions instead of a reusable workflow

changesets/action's publish: input is a literal shell command string it runs internally, so it can't be a uses: reference. A composite action step can still nest a uses: changesets/action@... step whose publish: points at ${{ github.action_path }}/release.mjs, i.e. the bundled script's on-runner path. That keeps each consumer's own job structure/permissions/notify steps untouched (they differ between kubb and plugins) while collapsing the actual duplicated logic into one place.

Test plan

  • pnpm install && pnpm test passes (18/18 tests, migrated verbatim from kubb's copies).
  • Once merged, kubb-labs/kubb#<PR> and kubb-labs/plugins#<PR> (opened alongside this one) pin to this branch's current commit SHA. If this PR is merged with a strategy that changes that SHA (squash/rebase), those two PRs' pinned SHA should be updated to match main before merging them.

Related: kubb-labs/kubb and kubb-labs/plugins PRs consuming these actions (opened alongside this one).


Generated by Claude Code

…se flow

kubb-labs/kubb and kubb-labs/plugins each carried byte-identical
scripts/release.mjs, scripts/createReleases.mjs, and
scripts/verifyRegistry.mjs implementing the stage/promote/verify/tag/release
flow. Move that logic here as two composite actions so both repos consume
one copy instead of two.
@changeset-bot

changeset-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6498246

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.

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

@stijnvanhulle
stijnvanhulle merged commit 018dc8b into main Jul 15, 2026
1 check passed
@stijnvanhulle
stijnvanhulle deleted the claude/move-script-kubb-labs-config-tq7erw branch July 15, 2026 15:23
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.

2 participants