Skip to main content
nx release is a set of subcommands for managing the full release lifecycle: bumping versions, generating changelogs, and publishing to a registry.

Subcommands

Runs version bumping, changelog generation, and optionally publishing in a single command.
Positional argument
string
Exact version or semver keyword to apply (e.g., major, minor, patch, prerelease, or 1.2.3).
Options
string
Prerelease identifier to append when using prerelease as the specifier, or when using conventional commits (e.g., alpha, beta).
boolean
Automatically answer yes to the publish confirmation prompt. Alias: -y. Mutually exclusive with --skip-publish.
boolean
Skip publishing by automatically answering no to the publish confirmation. Mutually exclusive with --yes.
number
One-time password for publishing to a registry that requires 2FA.
boolean
Indicates this is the first release for the selected release group. Uses the version on disk as a fallback when the current version cannot be determined, and skips checking for existing tags or packages.
Bump the version of one or more projects without running changelog or publish steps.
Positional argument
string
Exact version or semver keyword (e.g., major, minor, patch, 1.2.3).
Options
string
Prerelease identifier (e.g., alpha, beta).
boolean
Stage the changes made by this command. Useful when combining with changelog generation.
boolean
Automatically commit the changes made by this command.
string
Custom commit message. Use {version} as a placeholder for the version.
string
Additional arguments to pass to git commit.
boolean
Automatically create a git tag after versioning.
string
Custom message for the git tag.
boolean
Automatically push commits and tags to the remote repository.
string
default:"origin"
The git remote to push to.
boolean
Indicates this is the first release for the selected release group.
Generate a changelog for one or more projects and optionally create a GitHub/GitLab release.
Positional argument
string
required
The version to generate the changelog for.
Options
string
Git ref to use as the start of the changelog range. Defaults to the latest matching tag.
string
default:"HEAD"
Git ref to use as the end of the changelog range.
string
Open changelogs in your editor before applying. Choices: all, workspace, projects. Alias: -i.
boolean
default:"false"
Overwrite the existing changelog file contents instead of prepending to them.
string
default:"all"
How to resolve version plan files for changelog generation. Choices: all, using-from-and-to.
boolean
Indicates this is the first release; skips checking for existing git tags.
Publish versioned projects to a package registry.
Options
string
The registry URL to publish to.
string
The distribution tag to apply to the published package (e.g., latest, next, beta).
string
Access level for the published package. Choices: public, restricted. Unscoped packages cannot be set to restricted.
number
One-time password for registries that require 2FA.
boolean
Skip checking for the existence of the package before publishing.
Create a version plan file specifying the desired semver bump and a changelog entry for one or more projects or groups.
Positional argument
string
Semver keyword. Choices: major, premajor, minor, preminor, patch, prepatch, prerelease.
Options
string
Custom message to use as the changelog entry. Alias: -m.
boolean
default:"true"
Only include projects affected by current changes.
Verify that all touched projects have an applicable version plan file. Exits with a non-zero code if any are missing.

Global release options

These options apply to all nx release subcommands.
boolean
default:"false"
Preview changes without updating files, creating releases, or publishing packages. Alias: -d.
boolean
Print additional information about the release process.
string
One or more release groups to target (comma-separated). Defined in nx.json. Aliases: --group, -g. Mutually exclusive with --projects.
string
Comma or space-separated project names or patterns to target. Alias: -p. Mutually exclusive with --groups.
string
Print the resolved nx release configuration for the current command and exit.

Examples

Release groups

Release groups let you version and publish different subsets of your workspace independently. Define groups in nx.json:
Then target a group with: