Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atlassian/lerna-semantic-release
📦:🛠✨💥 – fully automated package publishing
https://github.com/atlassian/lerna-semantic-release
lerna semantic-release
Last synced: 2 months ago
JSON representation
📦:🛠✨💥 – fully automated package publishing
- Host: GitHub
- URL: https://github.com/atlassian/lerna-semantic-release
- Owner: atlassian
- Fork: true (semantic-release/semantic-release)
- Created: 2016-05-18T04:23:41.000Z (over 8 years ago)
- Default Branch: caribou
- Last Pushed: 2024-04-17T02:58:39.000Z (7 months ago)
- Last Synced: 2024-08-18T20:47:27.363Z (3 months ago)
- Topics: lerna, semantic-release
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/lerna-semantic-release
- Size: 816 KB
- Stars: 678
- Watchers: 36
- Forks: 42
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lerna-semantic-release
Status:
[![npm version](https://img.shields.io/npm/v/lerna-semantic-release.svg?style=flat-square)](https://www.npmjs.org/package/lerna-semantic-release)
[![npm downloads](https://img.shields.io/npm/dm/lerna-semantic-release.svg?style=flat-square)](http://npm-stat.com/charts.html?package=lerna-semantic-release)
[![Build Status](https://img.shields.io/travis/atlassian/lerna-semantic-release.svg?style=flat-square)](https://travis-ci.org/atlassian/lerna-semantic-release)[semantic-release](https://www.npmjs.com/package/semantic-release) for [lerna](http://lernajs.io)-based projects.
Basically a semantic-release that orders commits based on which package they belong to (uses data from [cz-lerna-changelog](https://github.com/atlassian/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:
```
commitizen init cz-lerna-changelog --save-dev --save-exact
```See the [commitizen-cli](https://github.com/commitizen/cz-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:
```
NPM_CONFIG_EMAIL
NPM_CONFIG_USERNAME
NPM_TOKEN
GH_TOKEN
RELEASE_GH_TOKEN
RELEASE_GH_USERNAME
```## Releasing
Execute these commands in your release process:
```
# 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.