semantic-release-example

3.0.1 • Public • Published

semantic-release-example

Greenkeeper badge Build Status codecov npm GitHub release license semantic-release

Introduction

This (very simple) package hopefully helps to illustrate how to implement the semantic-release package in an existing NPM package.

Implementation Notes

Use the semantic-release-cli package to get setup.

alt-text

It uses the Angular commit message convention which is also the default commit message convention for semantic-release.

It uses commitlint for (you guessed it) commit linting, and husky for Git hooks (specifically, the commit-msg hook.

The npm run semantic-commit script triggers a helpful commit message CLI (the commitlint cli package)

A new release is cut when the master branch Travis build successfully completes and there's a formatted commit message that should trigger a semantic version change. A Git tag is created, a GitHub release is created, and the NPM package is published with the appropriate semantic version update.

Invalid Commit Message Failure

alt-text

Commit Message CLI

Specify a type

alt-text

Specify a scope

alt-text

Specify a subject

alt-text

Full commit message after the CLI exits successfully

alt-text

Readme

Keywords

Package Sidebar

Install

npm i semantic-release-example

Weekly Downloads

2

Version

3.0.1

License

MIT

Unpacked Size

7.34 kB

Total Files

9

Last publish

Collaborators

  • jaebradley