Configs2026年5月17日·1 分钟阅读

release-it — Automated Versioning and Package Publishing

A CLI tool that automates version bumping, changelog generation, Git tagging, and publishing to npm or GitHub Releases with interactive or CI-driven workflows.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
release-it Overview
通用 CLI 安装命令
npx tokrepo install a5123bcf-51eb-11f1-9bc6-00163e2b0d79

Introduction

release-it automates the repetitive tasks of software releases: bumping the version in package.json, generating a changelog, creating a Git tag, pushing to the remote, and publishing to npm or creating a GitHub Release. It works interactively for manual releases or fully automated in CI pipelines.

What release-it Does

  • Bumps version numbers following semantic versioning (major, minor, patch)
  • Creates annotated Git tags and pushes them to the remote repository
  • Generates changelogs from conventional commits or custom templates
  • Publishes packages to npm, GitHub Packages, or other registries
  • Creates GitHub or GitLab releases with auto-generated release notes

Architecture Overview

release-it is a Node.js CLI built on a plugin architecture. The core orchestrates a release pipeline: version determination, file updates, Git operations, and publishing. Each step is handled by internal plugins (npm, git, github, gitlab) or community plugins. Hooks allow running arbitrary commands at any lifecycle point.

Self-Hosting & Configuration

  • Install as devDependency: npm install -D release-it
  • Create .release-it.json or add release-it key to package.json
  • Configure git.requireCleanWorkingDir and git.push behavior
  • Set npm.publish to true/false depending on registry needs
  • Add hooks for pre:bump, after:bump, before:release lifecycle events

Key Features

  • Plugin system for extending with changelog generators and custom publishers
  • Interactive prompts showing each step before execution
  • Monorepo support via workspaces plugin for coordinated releases
  • Conventional Changelog plugin for automatic CHANGELOG.md generation
  • Pre-release versions (alpha, beta, rc) with increment strategies

Comparison with Similar Tools

  • semantic-release — fully automated via CI, no interactive mode, opinionated
  • changesets — monorepo-focused with PR-based version management
  • standard-version — deprecated predecessor with similar scope
  • np — npm-focused publishing helper without Git release features

FAQ

Q: Can I use release-it in a CI pipeline without prompts? A: Yes, use the --ci flag or set ci: true in configuration to skip all interactive prompts.

Q: How does it determine the next version? A: By default it prompts you. With conventional-changelog plugin, it infers from commit messages (feat = minor, fix = patch, BREAKING = major).

Q: Does it support monorepos? A: Yes, via the @release-it/bumper plugin or workspaces configuration for coordinated multi-package releases.

Q: Can I run custom scripts during the release? A: Yes, use hooks in config: hooks.before:init, hooks.after:bump, hooks.after:release for arbitrary shell commands.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产