diff --git a/README.md b/README.md index 0484c091..4b4b73c9 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # :package::rocket: semantic-release -**Fully automated package publishing** - -> **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) +Fully automated version management and package publishing. [![Gitter](https://badges.gitter.im/semantic-release/semantic-release.svg)](https://gitter.im/semantic-release/semantic-release?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Travis](https://img.shields.io/travis/semantic-release/semantic-release/caribou.svg)](https://travis-ci.org/semantic-release/semantic-release) @@ -15,123 +11,137 @@ [![npm](https://img.shields.io/npm/v/semantic-release/latest.svg)](https://www.npmjs.com/package/semantic-release) [![npm](https://img.shields.io/npm/v/semantic-release/next.svg)](https://www.npmjs.com/package/semantic-release) -Out of the box this is just about _commit-messages_, but you can do so much more. +semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package. This removes the immediate connection between human emotions and version numbers, strictly following the [Semantic Versioning](http://semver.org) specification. -* **Detect breaking changes** using the test suite of your last release: [cracks](https://github.com/semantic-release/cracks) -* Detect breaking changes using your dependents’ test suites: [Help out! Implement the **dont-break** plugin](https://github.com/semantic-release/semantic-release/issues/65) -* Detect breaking changes diffing your JSDoc interface: [Help out! Implement the **india** plugin](https://github.com/semantic-release/semantic-release/issues/66) -* Abort releases with **insufficient test coverage**: [Help out! Implement the **istanbul** plugin](https://github.com/semantic-release/semantic-release/issues/68) -* Abort releases with **vulnerable dependencies** in the tree: [Help out! Implement the **nsp** plugin](https://github.com/semantic-release/semantic-release/issues/67) -* Everything you can imagine: [Build Plugins!](https://github.com/semantic-release/semantic-release#plugins) +> 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) -  | Commands | Comment ---- | --- | --- -| **manual/before** |
npm version major
git push origin master --tags
npm publish
| You **manually decide** what the **next version** is. You have to remember what major, minor and patch means. You have to remember to push both commits and tags. You have to wait for the CI to pass. | -| **semantic-release/after** |
git commit -m "fix: <message>"
git push
| You **describe the changes** you’ve made. A new version is automatically published with the correct version number. +## Highlights -This removes the immediate connection between human emotions and version numbers, so strictly following the [SemVer](http://semver.org/) spec is not a problem anymore – and that’s ultimately `semantic-release`’s goal. +- Fully automated release +- Enforce [Semantic Versioning](https://semver.org) specification +- New features and fixes are immediately available to users +- Use formalized commit message convention to document changes in the codebase +- Integrate with your [continuous integration workflow](docs/recipes/README.md#ci-configurations) +- Avoid potential errors associated with manual releases +- Support any [package managers and languages](docs/recipes/README.md#package-managers-and-languages) via [plugins](#plugins) +- Simple and reusable configuration via [shareable configurations](#shareable-configurations) - - - - - - - - - - - - - - - - - - - - - - -
- “How to Write a JavaScript Library - Automating Releases with semantic-release” – egghead.io -
- egghead.io session -
- A free egghead.io tutorial series on how to write an open source library featuring semantic-release. -
- “We fail to follow SemVer – and why it needn’t matter” - - “semantic-release Q&A with Kent C. Dodds” -
- JSConfBP Talk - - Hangout on Air with Kent C. Dodds -
- This talk gives you a complete introduction to the underlying concepts of this module. 38:30 - - A “Hangouts on Air” conversation with hands on questions and answers about how to use semantic-release. 53:52 -
+## Table of Contents + +- [How does it work?](#how-does-it-work) +- [Installation and Usage](#installation-and-usage) +- [Plugins](#plugins) +- [Shareable configurations](#shareable-configurations) +- [Recipes](#recipes) +- [Frequently Asked Questions](#frequently-asked-questions) +- [Resources](#resources) +- [Support](#support) +- [Badge](#badge) +- [Node Support Policy](#node-support-policy) +- [Team](#team) ## How does it work? -Instead of writing [meaningless commit messages](http://whatthecommit.com/), we can take our time to think about the changes in the codebase and write them down. Following formalized conventions it is then possible to generate a helpful changelog and to derive the next semantic version number from them. +### Commit message format -When `semantic-release` is set up it will do that after every successful continuous integration build of your master branch (or any other branch you specify) and publish the new version for you. This way no human is directly involved in the release process and your releases are guaranteed to be [unromantic and unsentimental](http://sentimentalversioning.org/). +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 publish the release. -If you fear the loss of control over timing and marketing implications of software releases you should know that `semantic-release` supports [release channels](https://github.com/npm/npm/issues/2718) using `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, you can decide when to promote an automatically released version to the stable channel, and you can choose which versions to write blogposts and tweets about. You can use the same mechanism to [support older versions of your software](https://gist.github.com/boennemann/54042374e49c7ade8910), for example with important security fixes. +By 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 that can changed with the [`preset` or `config` options](#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. -When pushing new commits with `git push` a CI build is triggered. After running the tests the command `semantic-release` will execute the following tasks in series: +Tools such as [commitizen](https://github.com/commitizen/cz-cli), [commitlint](https://github.com/marionebl/commitlint) or [semantic-git-commit-cli](https://github.com/JPeer264/node-semantic-git-commit-cli) can be used to help contributor and enforce valid commits message. -| Step | Description | -| ------------------ | ------------------------------------------------------------------------------------------- | -| Verify Conditions | Run the [verifyConditions](#verifyconditions) plugin | -| Get last release | Obtain last release with the [getLastRelease](#getlastrelease) plugin | -| Analyze commits | Determine the type of release to do with the [analyzeCommits](#analyzecommits) plugin | -| Verify release | Call the [verifyRelease](#verifyrelease) plugin | -| Generate notes | Generate release notes with plugin [generateNotes](#generatenotes) | -| Publish | Call the [publish](#publish) plugin | +Here is an example of the release type that will be done based on a commit messages: -## Default Commit Message Format +| Commit message | Release type | +|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| +| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release | +| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release | +| `perf(pencil): remove graphiteWidth option`

`BREAKING CHANGE: The graphiteWidth option has been removed.`
`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release | -This module ships with the [AngularJS Commit Message Conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit) and changelog generator, but you can [define your own](#plugins) style. +### Automation with CI -Each commit message consists of a **header**, a **body** and a **footer**. The header has a special -format that includes a **type**, a **scope** and a **subject** ([full explanation](https://github.com/stevemao/conventional-changelog-angular/blob/master/convention.md)): +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). -``` -(): - - - -