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 initConfig
Set baseBranch to main, enable commit and linked packages. Use fixed for tightly coupled groups.
Workflow
pnpm changeset— pick bumped packages and semver- Commit the generated markdown file
- CI runs
changeset version— bumps, updates deps, writes CHANGELOGs - 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.