Interactive release tool for Git repositories. Increment version, commit, tag, push, build, publish to npm. Supports to build and release to a distribution/component repository.
Interactive release tool for Git repositories. Publish to npm. Optionally build and release to a distribution/component repository.
Automatically bump version, commit, tag, push, publish, done.
Obviously, Release It has released itself. Cool, heh?! There's also a Grunt plugin.
npm install release-it -g
Release a "patch" update (increments the
0.0.x by one):
Release a patch, minor, major, or specific version:
release-it minorrelease-it 0.8.3release-it 2.0.0-rc.3
You can also do a dry run, which won't write/touch anything, but does output the commands it would execute, and show the interactivity:
If you don't like questions and trust the tool, you can use the
Provide a custom name for the GitHub release:
release-it --githubReleaseName="Awesome Ants"
Release It can do a lot out-of-the-box, but has plenty of options to configure it.
$ release --helpRelease It! v1.0.0Usage: release <increment> [options]Use e.g. "release minor" directly as shorthand for "release --increment=minor".Options:-c, --config Path to local configuration options [default: ".release.json"]-d, --dry-run Do not touch or write anything, but show the commands and interactivity-e, --debug Output exceptions-f, --force Force tagging with Git-h, --help Print help-i, --increment Incrementing "major", "minor", or "patch" version; or specify version [default: "patch"]-n, --non-interactive No interaction (assume default answers to questions)-p, --publish Publish to npm (only in --non-interactive mode)-v, --version Print version number-V, --verbose Verbose output
Some projects use a special distribution repository. There might be multiple reasons to do.
distRepoto a git endpoint (e.g.
distRepo, but still want to publish the source repository to npm, make sure to set
The tool assumes you've configured your SSH keys and remotes correctly. In case you need to configure things for GitHub, the following pages might be of help.
To create GitHub releases, you'll need to set
true, get a GitHub access token, and make this available as the environment variable defined with
githubTokenRef. With the default settings, you could set it like this:
.release.json file in your project root, and Release It will use it to overwrite default settings. You can use
--config if you want to use another filename/location. Most options can be set on the command-line (these will have highest priority).
To keep you in control, many steps need your confirmation before execution. This is what happens if you answer "Yes" to each question:
With the current repository:
%sis replaced with the new version).
githubReleaseNameand output of
distRepo? Publish package to npm.
Additionally, if a distribution repository is configured:
distBaseand execute the
distRepoprocess are actually executed before you are asked to commit anything (even in the source repo), so you know about build, clone, or copy issues as soon as possible.
"private": truesetting in package.json will be respected and you will not be bothered with the question to publish to npm.
The following Grunt plugins have been a source of inspiration:
Why did I need to create yet another "release" tool/plugin? I think this tool stands out: