Back to docs
Recipe

Changesets for monorepo

Version packages independently, generate changelogs automatically, and ship with confidence across multiple workspaces.

Setup

pnpm add -Dw @changesets/cli && pnpm changeset init

Config

Set baseBranch to main, enable commit and linked packages. Use fixed for tightly coupled groups.

Workflow

  1. pnpm changeset — pick bumped packages and semver
  2. Commit the generated markdown file
  3. CI runs changeset version — bumps, updates deps, writes CHANGELOGs
  4. CI runs changeset publish — releases to npm

GitHub Action

Use the official changesets/action with publish script. Add NPM_TOKEN and GITHUB_TOKEN secrets.

Pro tip: Add a pre.json for prerelease mode when cutting beta or RC releases across the monorepo.