UNPKG

12.1 kBMarkdownView Raw
1<h1 align="center" style="border-bottom: none;">📦🚀 semantic-release</h1>
2<h3 align="center">Fully automated version management and package publishing</h3>
3<p align="center">
4 <a href="https://spectrum.chat/semantic-release">
5 <img alt="Join the community on Spectrum" src="https://withspectrum.github.io/badge/badge.svg">
6 </a>
7 <a href="https://travis-ci.org/semantic-release/semantic-release">
8 <img alt="Travis" src="https://img.shields.io/travis/semantic-release/semantic-release/master.svg">
9 </a>
10 <a href="https://codecov.io/gh/semantic-release/semantic-release">
11 <img alt="Codecov" src="https://img.shields.io/codecov/c/github/semantic-release/semantic-release/master.svg">
12 </a>
13 <a href="https://greenkeeper.io">
14 <img alt="Greenkeeper" src="https://badges.greenkeeper.io/semantic-release/semantic-release.svg">
15 </a>
16 <a href="#badge">
17 <img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg">
18 </a>
19</p>
20<p align="center">
21 <a href="https://waffle.io/semantic-release/semantic-release">
22 <img alt="Waffle.io" src="https://badge.waffle.io/semantic-release/semantic-release.svg?columns=all">
23 </a>
24</p>
25<p align="center">
26 <a href="https://www.npmjs.com/package/semantic-release">
27 <img alt="npm latest version" src="https://img.shields.io/npm/v/semantic-release/latest.svg">
28 </a>
29 <a href="https://www.npmjs.com/package/semantic-release">
30 <img alt="npm next version" src="https://img.shields.io/npm/v/semantic-release/next.svg">
31 </a>
32</p>
33
34**semantic-release** automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package.
35
36This removes the immediate connection between human emotions and version numbers, strictly following the [Semantic Versioning](http://semver.org) specification.
37
38> Trust us, this will change your workflow for the better. – [egghead.io](https://egghead.io/lessons/javascript-how-to-write-a-javascript-library-automating-releases-with-semantic-release)
39
40## Highlights
41
42- Fully automated release
43- Enforce [Semantic Versioning](https://semver.org) specification
44- New features and fixes are immediately available to users
45- Notify maintainers and users of new releases
46- Use formalized commit message convention to document changes in the codebase
47- Integrate with your [continuous integration workflow](docs/recipes/README.md#ci-configurations)
48- Avoid potential errors associated with manual releases
49- Support any [package managers and languages](docs/recipes/README.md#package-managers-and-languages) via [plugins](docs/usage/plugins.md)
50- Simple and reusable configuration via [shareable configurations](docs/usage/shareable-configurations.md)
51
52## How does it work?
53
54### Commit message format
55
56**semantic-release** uses the commit messages to determine the type of changes in the codebase. Following formalized conventions for commit messages, **semantic-release** automatically determines the next [semantic version](https://semver.org) number, generates a changelog and publishes the release.
57
58By default **semantic-release** uses [Angular Commit Message Conventions](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines). The commit message format can be changed with the [`preset` or `config` options](docs/usage/configuration.md#options) of the [@semantic-release/commit-analyzer](https://github.com/semantic-release/commit-analyzer#options) and [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator#options) plugins.
59
60Tools such as [commitizen](https://github.com/commitizen/cz-cli), [commitlint](https://github.com/conventional-changelog/commitlint) or [semantic-git-commit-cli](https://github.com/JPeer264/node-semantic-git-commit-cli) can be used to help contributors and enforce valid commit messages.
61
62Here is an example of the release type that will be done based on a commit messages:
63
64| Commit message | Release type |
65|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------|
66| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
67| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
68| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
69
70### Automation with CI
71
72**semantic-release** is meant to be executed on the CI environment after every successful build on the release branch. This way no human is directly involved in the release process and the releases are guaranteed to be [unromantic and unsentimental](http://sentimentalversioning.org).
73
74### Triggering a release
75
76For each new commits added to the release branch (i.e. `master`) with `git push` or by merging a pull request or merging from another branch, a CI build is triggered and runs the `semantic-release` command to make a release if there are codebase changes since the last release that affect the package functionalities.
77
78If you need more control over the timing of releases you have a couple of options:
79- Publish releases on a distribution channel (for example npm’s [dist-tags](https://docs.npmjs.com/cli/dist-tag)). This way you can keep control over what your users end up using by default, and you can decide when to make an automatically released version available to the stable channel, and promote it.
80- Develop on a `dev` branch and merge it to the release branch (i.e. `master`) once you are ready to publish. **semantic-release** will run only on pushes to the release branch.
81
82### Release steps
83
84After running the tests, the command `semantic-release` will execute the following steps:
85
86| Step | Description |
87|-------------------|---------------------------------------------------------------------------------------------------------------------------------|
88| Verify Conditions | Verify all the conditions to proceed with the release. |
89| Get last release | Obtain the commit corresponding to the last release by analyzing [Git tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging). |
90| Analyze commits | Determine the type of release based on the commits added since the last release. |
91| Verify release | Verify the release conformity. |
92| Generate notes | Generate release notes for the commits added since the last release. |
93| Create Git tag | Create a Git tag corresponding to the new release version. |
94| Prepare | Prepare the release. |
95| Publish | Publish the release. |
96| Notify | Notify of new releases or errors. |
97
98## Documentation
99
100- Usage
101 - [Getting started](docs/usage/getting-started.md#getting-started)
102 - [Installation](docs/usage/installation.md#installation)
103 - [CI Configuration](docs/usage/ci-configuration.md#ci-configuration)
104 - [Configuration](docs/usage/configuration.md#configuration)
105 - [Plugins](docs/usage/plugins.md)
106 - [Shareable configurations](docs/usage/shareable-configurations.md)
107- Extending
108 - [Plugins](docs/extending/plugins-list.md)
109 - [Shareable configuration](docs/extending/shareable-configurations-list.md)
110- Recipes
111 - [CI configurations](docs/recipes/README.md)
112 - [Package managers and languages](docs/recipes/README.md)
113- Developer guide
114 - [JavaScript API](docs/developer-guide/js-api.md)
115 - [Plugins](docs/developer-guide/plugin.md)
116 - [Shareable configuration](docs/developer-guide/shareable-configuration.md)
117- Support
118 - [Resources](docs/support/resources.md)
119 - [Frequently Asked Questions](docs/support/FAQ.md)
120 - [Troubleshooting](docs/support/troubleshooting.md)
121 - [Node version requirement](docs/support/node-version.md)
122 - [Node Support Policy](docs/support/node-support-policy.md)
123
124## Get help
125
126- [Stack Overflow](https://stackoverflow.com/questions/tagged/semantic-release)
127- [Spectrum community](https://spectrum.chat/semantic-release)
128- [Twitter](https://twitter.com/SemanticRelease)
129
130## Badge
131
132Let people know that your package is published using **semantic-release** by including this badge in your readme.
133
134[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
135
136```md
137[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
138```
139
140## Team
141
142| [![Stephan Bönnemann](https://github.com/boennemann.png?size=100)](https://github.com/boennemann) | [![Rolf Erik Lekang](https://github.com/relekang.png?size=100)](https://github.com/relekang) | [![Johannes Jörg Schmidt](https://github.com/jo.png?size=100)](https://github.com/jo) | [![Gregor Martynus](https://github.com/gr2m.png?size=100)](https://github.com/gr2m) | [![Pierre Vanduynslager](https://github.com/finnp.png?size=100)](https://github.com/finnp) | [![Pierre Vanduynslager](https://github.com/pvdlg.png?size=100)](https://github.com/pvdlg) | [![Christoph Witzko](https://github.com/christophwitzko.png?size=100)](https://github.com/christophwitzko) |
143|---------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------|
144| [Stephan Bönnemann](https://github.com/boennemann) | [Rolf Erik Lekang](https://github.com/relekang) | [Johannes Jörg Schmidt](https://github.com/jo) | [Gregor Martynus](https://github.com/gr2m) | [Finn Pauls](https://github.com/finnp) | [Pierre Vanduynslager](https://github.com/pvdlg) | [Christoph Witzko](https://github.com/christophwitzko) |
145
146<p align="center">
147 <img alt="Kill all humans" src="media/bender.png">
148</p>