kubb-labs/config

August 14, 2026 ยท View on GitHub

Shared configuration and reusable GitHub Actions for Kubb packages.

Actions

.github/setup

A composite action that sets up the standard Kubb development environment:

Inputs

InputDescriptionDefault
node-versionNode.js version to use (e.g., 22, 24, or 22.x)(required)
cacheCache/build tool: turbo or moonturbo
force-installRe-fetch dependencies with pnpm install --frozen-lockfile --force instead of --prefer-offlinefalse

Usage

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: kubb-labs/config/.github/setup@main
        with:
          node-version: '22'

      - run: pnpm build
Specifying a Node.js version
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: kubb-labs/config/.github/setup@main
        with:
          node-version: '24.x'

      - run: pnpm build
Using moon instead of Turbo
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: kubb-labs/config/.github/setup@main
        with:
          node-version: '22'
          cache: moon

      - run: moon ci

.github/actions/release

A composite action that wraps changesets/action to version and stage-publish a changesets release, using a bundled release.mjs. createGithubReleases stays off, since a staged version isn't public until .github/actions/promote confirms npm approval.

Inputs

InputDescriptionDefault
github-tokenToken for changesets/action (needs contents: write, pull-requests: write, issues: write)(required)
commit-messageCommit message for the version-bump commitci(changesets): version packages
titlePR title for the version-bump PRci(changesets): version packages

Outputs

OutputDescription
stagedtrue if release.mjs staged at least one package
staged_packagesJSON array of {name, version} staged by release.mjs

Usage

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
      pull-requests: write
      issues: write
    outputs:
      staged: ${{ steps.release.outputs.staged }}
      staged_packages: ${{ steps.release.outputs.staged_packages }}
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: kubb-labs/config/.github/setup@main
        with:
          node-version: '22'

      - name: Release
        id: release
        uses: kubb-labs/config/.github/actions/release@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

.github/actions/promote

A composite action that verifies staged package versions are live on npm, tags the release, and creates GitHub Releases, using bundled verifyRegistry.mjs and createReleases.mjs. Runs after a maintainer approves the staged versions on npm and the environment review for the job calling this action.

Inputs

InputDescriptionDefault
staged-packagesJSON array of {name, version} staged by .github/actions/release(required)
github-tokenToken for gh release create (contents: write)(required)
release-modecombined for one release per version (fixed/linked packages), unset/per-package otherwise(empty, i.e. per-package)
verify-interval-secondsHow often to re-poll npm while waiting for a staged version to propagate300
verify-retry-attemptsHow many times to poll npm before giving up10

Outputs

OutputDescription
approvedtrue once every staged package is confirmed live on npm

Usage

jobs:
  promote:
    needs: [release]
    if: ${{ needs.release.outputs.staged == 'true' }}
    environment:
      name: npm-release-approval
    runs-on: ubuntu-latest
    permissions:
      contents: write
    outputs:
      approved: ${{ steps.promote.outputs.approved }}
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - uses: kubb-labs/config/.github/setup@main
        with:
          node-version: '22'

      - name: Promote
        id: promote
        uses: kubb-labs/config/.github/actions/promote@main
        with:
          staged-packages: ${{ needs.release.outputs.staged_packages }}
          github-token: ${{ secrets.GITHUB_TOKEN }}
          release-mode: combined

License

MIT