nxpm release

The release command helps versioning, releasing packages to GitHub and publishing them to npm.

Before it does this, it will validate the workspace and can fix some inconsistencies that might exist in your packages.


The release command does not build your packages.

In order to build all your packages you can run:

yarn nx run-many --target build --all


At this moment the release command is very opinionated about what and how it publishes.

  • It publishes all the publishable packages defined in the workspace file.
  • It requires all packages to have their name start with the npmScope defined in nx.json.
  • It requires all packages to have a license field.
  • It requires all packages to have their version set to 0.0.0-development.

This is all subject to change, ideally this tool should be flexible enough to fit all common use cases for releasing to npm.

Feel free to share thoughts or code.

Dry Run

Because you probably don't want to risk publishing broken packages to npm, it's smart to run the release command in dry-run mode:

nxpm release 1.0.0 --dry-run

This will run the validations and tell you if it's able to release the package or if you need to fix things.

The cli has a --fix option that will fix the issues for you.


The --fix flag will try to correct any validations errors it finds.

nxpm release 1.0.0 --dry-run --fix


Once you are happy with the suggested release plan, you can run it:

nxpm release 1.0.0


versionn/anoneThe version you want to release in semver format (eg: 1.2.3-beta.4)
--cwd-cprocess.cwd()The version you want to release in semver format (eg: 1.2.3-beta.4)
--dry-run-dfalseDry run, don't make permanent changes
--fix-ffalseAutomatically fix known issues
--help-hfalseshow CLI help
--allow-ivy-itrueAllow publishing Angular packages built for Ivy