All Projects → release-it → Release It

release-it / Release It

Licence: mit
🚀 Automate versioning and package publishing

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects

Projects that are alternatives of or similar to Release It

Semantic Release
📦🚀 Fully automated version management and package publishing
Stars: ✭ 14,364 (+200.94%)
Mutual labels:  automation, publish, release, release-automation, changelog, semver
Cli
🆑📍 Setup automated semver compliant package publishing
Stars: ✭ 272 (-94.3%)
Mutual labels:  automation, publish, release, changelog, semver
React Native Version
🔢 Version your React Native or Expo app in a `npm version` fashion.
Stars: ✭ 408 (-91.45%)
Mutual labels:  cli, hooks, release, semver
Releaser Tools
Create a GitHub/GitLab/etc. release using a project's commit messages and metadata.
Stars: ✭ 283 (-94.07%)
Mutual labels:  release, release-automation, changelog, gitlab
Shipjs
Take control of what is going to be your next release.
Stars: ✭ 668 (-86%)
Mutual labels:  automation, release, semver
Nps
NPM Package Scripts -- All the benefits of npm scripts without the cost of a bloated package.json and limits of json
Stars: ✭ 1,285 (-73.08%)
Mutual labels:  automation, cli, npm
Cli
Get a programmable email address. Automate what happens when you receive emails. It's like Zapier for devs who hate emails.
Stars: ✭ 105 (-97.8%)
Mutual labels:  automation, cli, npm
attribution
Generate changelogs from commit tags and shortlogs
Stars: ✭ 20 (-99.58%)
Mutual labels:  changelog, release, release-automation
Commit Analyzer
💡 semantic-release plugin to analyze commits with conventional-changelog
Stars: ✭ 146 (-96.94%)
Mutual labels:  publish, release, changelog
Tox
Command line driven CI frontend and development task automation tool.
Stars: ✭ 2,523 (-47.14%)
Mutual labels:  automation, cli, gitlab
Bump
Bump updates the project's version, updates/creates the changelog, makes the bump commit, tags the bump commit and makes the release to GitHub. Opinionated but configurable.
Stars: ✭ 327 (-93.15%)
Mutual labels:  automation, release, changelog
Please
please is semver release made easy
Stars: ✭ 72 (-98.49%)
Mutual labels:  automation, release, semver
Create Component App
Tool to generate different types of React components from the terminal. 💻
Stars: ✭ 879 (-81.58%)
Mutual labels:  automation, cli, tool
generate-changelog
generates changelog from git based on jira tickets
Stars: ✭ 18 (-99.62%)
Mutual labels:  changelog, release, release-automation
perfekt
Release, changelog and version your packages with perfe(k)t 👌 ease!
Stars: ✭ 15 (-99.69%)
Mutual labels:  changelog, semver, release
Syncpack
Manage multiple package.json files, such as in Lerna Monorepos and Yarn/Pnpm Workspaces
Stars: ✭ 356 (-92.54%)
Mutual labels:  cli, npm, semver
release-changelog-builder-action
A GitHub action that builds your release notes / changelog fast, easy and exactly the way you want.
Stars: ✭ 515 (-89.21%)
Mutual labels:  changelog, release, release-automation
Npm
🚢 semantic-release plugin to publish a npm package
Stars: ✭ 103 (-97.84%)
Mutual labels:  publish, release, npm
Release Notes Generator
📋 semantic-release plugin to generate changelog content with conventional-changelog
Stars: ✭ 123 (-97.42%)
Mutual labels:  publish, release, changelog
wisdom
🎁 Tool for publishing releases to github and npm
Stars: ✭ 16 (-99.66%)
Mutual labels:  changelog, release, publish

Release It! 🚀

🚀 Generic CLI tool to automate versioning and package publishing related tasks:

Use release-it for version management and publish to anywhere with its versatile configuration, a powerful plugin system, and hooks to execute any command you need to test, build, and/or publish your project.

Action Status npm version codecov

Links

Installation

Although release-it is a generic release tool, installation requires npm. To use release-it, a package.json file is not required. The recommended way to install release-it also adds basic configuration. Answer one or two questions and it's ready:

npm init release-it

Alternatively, install it manually, and add the release script to package.json:

npm install --save-dev release-it
{
  "name": "my-package",
  "version": "1.0.0",
  "scripts": {
    "release": "release-it"
  },
  "devDependencies": {
    "release-it": "*"
  }
}

Now you can run npm run release from the command line (any release-it arguments behind the --):

npm run release
npm run release -- minor --ci

Global usage

Use release-it in any (non-npm) project, take it for a test drive, or install it globally:

# Run release-it from anywhere (without installation)
npx release-it

# Install globally and run from anywhere
npm install --global release-it
release-it

Usage

Release a new version:

release-it

You will be prompted to select the new version, and more prompts will follow based on your setup.

Run release-it from the root of the project to prevent potential issues.

Dry Runs

Use --dry-run to show the interactivity and the commands it would execute.

→ See Dry Runs for more details.

To print the next version without releasing anything, add the --release-version flag.

Configuration

Out of the box, release-it has sane defaults, and plenty of options to configure it. Most projects use a .release-it.json in the project root, or a release-it property in package.json.

→ See Configuration for more details.

Here's a quick example .release-it.json:

{
  "git": {
    "commitMessage": "chore: release v${version}"
  },
  "github": {
    "release": true
  }
}

Interactive vs. CI mode

By default, release-it is interactive and allows you to confirm each task before execution:

By using the --ci option, the process is fully automated without prompts. The configured tasks will be executed as demonstrated in the first animation above. On a Continuous Integration (CI) environment, this non-interactive mode is activated automatically.

Use --only-version to use a prompt only to determine the version, and automate the rest.

Latest version

How does release-it determine the latest version?

  1. For projects with a package.json, its version will be used (see npm to skip this).
  2. Otherwise, release-it uses the latest Git tag to determine which version should be released.
  3. As a last resort, 0.0.0 will be used as the latest version.

Alternatively, a plugin can be used to override this (e.g. to manage a VERSION or composer.json file):

Add the --release-version flag to print the next version without releasing anything.

Git

Git projects are supported well by release-it, automating the tasks to stage, commit, tag and push releases to any Git remote.

→ See Git for more details.

GitHub Releases

GitHub projects can have releases attached to Git tags, containing release notes and assets. There are two ways to add GitHub releases in your release-it flow:

  1. Automated (requires a GITHUB_TOKEN)
  2. Manual (using the GitHub web interface with pre-populated fields)

→ See GitHub Releases for more details.

GitLab Releases

GitLab projects can have releases attached to Git tags, containing release notes and assets. To automate GitLab releases:

→ See GitLab Releases for more details.

Changelog

By default, release-it generates a changelog, to show and help select a version for the new release. Additionally, this changelog serves as the release notes for the GitHub or GitLab release.

The default command is based on git log .... This setting (git.changelog) can be overridden. To further customize the release notes for the GitHub or GitLab release, there's github.releaseNotes or gitlab.releaseNotes. Make sure any of these commands output the changelog to stdout. Plugins are available for:

  • GitHub and GitLab Releases
  • auto-changelog
  • Conventional Changelog
  • Keep A Changelog

→ See Changelog for more details.

Publish to npm

With a package.json in the current directory, release-it will let npm bump the version in package.json (and package-lock.json if present), and publish to the npm registry.

→ See Publish to npm for more details.

Manage pre-releases

With release-it, it's easy to create pre-releases: a version of your software that you want to make available, while it's not in the stable semver range yet. Often "alpha", "beta", and "rc" (release candidate) are used as identifier for pre-releases. An example pre-release version is 2.0.0-beta.0.

→ See Manage pre-releases for more details.

Update or re-run existing releases

Use --no-increment to not increment the last version, but update the last existing tag/version.

This may be helpful in cases where the version was already incremented. Here's a few example scenarios:

  • To update or publish a (draft) GitHub Release for an existing Git tag.
  • Publishing to npm succeeded, but pushing the Git tag to the remote failed. Then use release-it --no-increment --no-npm to skip the npm publish and try pushing the same Git tag again.

Hooks

Use script hooks to run shell commands at any moment during the release process (such as before:init or after:release).

The format is [prefix]:[hook] or [prefix]:[plugin]:[hook]:

part value
prefix before or after
plugin version, git, npm, github, gitlab
hook init, bump, release

Use the optional :plugin part in the middle to hook into a life cycle method exactly before or after any plugin.

The core plugins include version, git, npm, github, gitlab.

Note that hooks like after:git:release will not run when either the git push failed, or when it is configured not to be executed (e.g. git.push: false). See execution order for more details on execution order of plugin lifecycle methods.

All commands can use configuration variables (like template strings). An array of commands can also be provided, they will run one after another. Some example release-it configuration:

{
  "hooks": {
    "before:init": ["npm run lint", "npm test"],
    "after:my-plugin:bump": "./bin/my-script.sh",
    "after:bump": "npm run build",
    "after:git:release": "echo After git push, before github release",
    "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
  }
}

The variables can be found in the default configuration. Additionally, the following variables are exposed:

version
latestVersion
changelog
name
repo.remote, repo.protocol, repo.host, repo.owner, repo.repository, repo.project

All variables are available in all hooks. The only exception is that the additional variables listed above are not yet available in the init hook.

Use --verbose to log the output of the commands.

For the sake of verbosity, the full list of hooks is actually: init, beforeBump, bump, beforeRelease, release or afterRelease. However, hooks like before:beforeRelease look weird and are usually not useful in practice.

Plugins

Since v11, release-it can be extended in many, many ways. Here are some plugins:

Plugin Description
@release-it/bumper Read & write the version from/to any file
@release-it/conventional-changelog Provides recommended bump, conventional-changelog, and updates CHANGELOG.md
@release-it/keep-a-changelog Maintain CHANGELOG.md using the Keep a Changelog standards
release-it-lerna-changelog Integrates lerna-changelog into the release-it pipeline
release-it-yarn-workspaces Releases each of your projects configured workspaces
release-it-calver-plugin Enables Calendar Versioning (calver) with release-it
@grupoboticario/news-fragments An easy way to generate your changelog file
@j-ulrich/release-it-regex-bumper Regular expression based version read/write plugin for release-it

Internally, release-it uses its own plugin architecture (for Git, GitHub, GitLab, npm).

→ See all release-it plugins on npm.

→ See plugins for documentation to write plugins.

Distribution repository

Deprecated. Please see distribution repository for more details.

Metrics

Use --disable-metrics to opt-out of sending some anonymous statistical data to Google Analytics. For details, refer to lib/metrics.js. Please consider to not opt-out: more data means more support for future development.

Troubleshooting & debugging

  • With release-it --verbose (or -V), release-it prints the output of every user-defined hook.
  • With release-it -VV, release-it also prints the output of every internal command.
  • Use DEBUG=release-it:* release-it [...] to print configuration and more error details.

Use verbose: 2 in a configuration file to have the equivalent of -VV on the command line.

Use release-it programmatically

While mostly used as a CLI tool, release-it can be used as a dependency to integrate in your own scripts. See use release-it programmatically for example code.

Example projects using release-it

Resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].