nextjs-cms

Releasing

How changes become versions on npm, with Changesets and GitHub Actions.

Versioning and changelogs are managed with Changesets.

Published packages

PackageFolder
nextjs-cmspackages/nextjs-cms
create-nextjs-cmspackages/create-nextjs-cms
@nextjscms/translationspackages/translations
@nextjscms/plugin-*plugins/*

nextjs-cms-app (apps/cms) is ignored by Changesets; it ships to users through create-nextjs-cms's generated template.

1. Every PR adds a changeset

Terminal
pnpm changeset

This writes a Markdown file in .changeset/ naming the packages, the bump, and a summary:

.changeset/brave-otters-sing.md
---
'nextjs-cms': minor
---

Add `allowInlineColors` to `richTextField` to keep body text on the site's theme.

Write the summary for users: what changed and what they need to do. It goes straight into CHANGELOG.md.

BumpWhen
patchBug fixes, internal changes, docs in the package
minorNew options, fields, commands, backwards-compatible features
majorRemoved or renamed options, changed defaults, anything requiring user changes

Internal dependents are bumped automatically (updateInternalDependencies: "patch").

2. CI checks it

The Changeset Check workflow runs pnpm changeset status --since origin/main on pull requests to main.

3. Merging to main opens a release PR

The Release workflow (.github/workflows/release.yml) runs on every push to main:

  1. Installs, tests, lints, and type-checks.
  2. Runs changesets/action:
    • If there are pending changesets, it opens (or updates) a "Version Packages" pull request that runs pnpm changeset version: bumps versions, writes changelogs, and deletes the consumed changesets.
    • If that PR was just merged (no pending changesets, versions changed), it runs the publish command (pnpm release) to publish to npm.

Review the Version Packages PR like any other: the changelog is user-facing.

Building for release

Terminal
pnpm build:release   # nextjs-cms, create-nextjs-cms, @nextjscms/translations
pnpm build:plugins

create-nextjs-cms's build regenerates its templates/ from apps/cms (scripts/build.ts), replacing workspace:* dependencies with the published versions, so the scaffolded app always matches the released core.

Warning:

The Release workflow publishes with pnpm release. Make sure a release script exists in the root package.json (building the packages and running changeset publish) before relying on automated publishing.

Versioning policy

  • The CLI checks that the project's nextjs-cms version matches what the CLI expects before running commands, so core and CLI stay in lockstep (they're the same package).
  • Keep create-nextjs-cms and nextjs-cms releases aligned when the template changes.
  • Breaking changes need a migration section in the changeset summary and, for larger ones, a guide in the developer docs.