Socket
Book a DemoInstallSign in
Socket

autorelease

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autorelease

Automatically release NPM packages based on commit messages.

latest
Source
npmnpm
Version
1.7.1
Version published
Maintainers
1
Created
Source

Autorelease

npm David Build Status

This is a tool to facilitate the releasing of NPM packages based on Git commit messages. This tool is designed to handled all aspects of publishing Node modules, including:

  • Release verification to ensure the environment is configured correctly before publishing.
  • Bumping package versions using semver according to commit types.
  • Generating changelogs from commit messages.
  • Tagging the commit in Git with the new version.

This is tool is highly configurable and can be adapted using plugins for almost any environment.

This is very similar to semantic-release, but it is much less opinionated. By default, this library does not assume you are using any specific remote git repository host or continuous integration platform. You can configure this tool to work with the environment of your choosing.

Install

Install using NPM:

npm i autorelease --save-dev

You can also easily setup your package for Github or Gitlab using the autorelease-setup cli. That will take you through a series of prompts and install the correct autorelease packages, including plugins.

npm i autorelease-setup -g
autorelease-setup

Basic Usage

This CLI tool is split into two parts, a before release (pre) stage and an after release (post) stage, each with a series of steps. The before release sets up the repository for release, including release verification, bumping the version number and configuring NPM. The after release stage handles changelog generation and git tagging. The steps in these stages can be configured using the .autoreleaserc file.

To release a module using this tool, add the following to you package.json after installing.

{
	"scripts": {
		"autorelease": "autorelease pre && npm publish && autorelease post"
	}
}

You will also need to generate an NPM token, either by using npm login or with a package like get-npm-token. Set the token to the NPM_TOKEN environment variable.

export NPM_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Now you can release your package from the command line with:

npm run autorelease

Plugins

There are currently a handful of plugins for Autorelease to configure it for common environments.

Keywords

auto

FAQs

Package last updated on 07 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts