You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically a semantic-release that orders commits based on which package they belong to (uses data from cz-lerna-changelog) and then determines on that what the next release should be.
Setup
Setting up commitizen
Install cz-lerna-changelog in your repository:
npm install commitizen -g
Next, initialize your project to use the cz-lerna-changelog adapter by typing:
See the commitizen-cli docs for more details on how to set up commitizen with the correct adapter.
Setting up the build
You'll need to set up your build in such a way that tags and commits can be pushed back to the repository. This is so that lerna can stay in sync with the NPM releases.
You'll also need to set the NPM_TOKEN environment variable so that npm can run npm publish on your components.
Travis CI integration
See .travis.yml and .travis/ in this repository for examples of how to set up lerna-semantic-release with Travis CI.
The following environment variables will need to be set:
# Pre
lerna-semantic-release pre # Set up the versions, tags and commits
# Perform
lerna-semantic-release perform # Publishes to npm
# Post
lerna-semantic-release post # Generates a changelog in each package in a file named CHANGELOG.md - will not commit or push that file any more after version 7.0.5 any more. If you want to do something with it, you will need to do this manually.
This will publish all npm packages, including creating commits and tags for each release, in the format that lerna expects for the `lerna updated` command.