๐Ÿš€lazy-release

Automate versioning, publishing, and creating changelogs for Node.js projects

Using conventional commits and supports multi-package repos

pnpm i @lazy-release/cli -D
Contributors WelcomeNPM VersionLicense

โœจ Features

๐Ÿ“

Automated Changelogs

Generate nice looking changelogs from conventional commits

๐Ÿ”–

Version Management

Automatic semantic versioning based on commit messages

๐Ÿท๏ธ

Git Tag Management

Automatically creates and publishes git version tags

๐Ÿ“ฆ

Package Manager Agnostic

Works with npm, pnpm, yarn, and bun

๐Ÿค–

GitHub Integration

Automatic PR creation and GitHub releases

๐Ÿงช

Snapshot Releases

Create preview versions for testing

๐ŸŽฏ

Monorepo Support

Manage multiple packages in a single repository

โšก

Fast & Reliable

Built for speed and consistency in CI/CD environments

๐Ÿ”„ How It Works

A simple three-step automated release process

1

Merge Pull Request

A dev merges a Pull Request into the main branch using squash merge. The PR should be prefixed with conventional commit prefix (fix, feat, chore, etc.)

feat: add new feature
โ†“
2

Release PR Created

A Release PR gets automatically created with:

  • โœ… Bumped version in package.json files
  • โœ… Updated lock files
  • โœ… Created or updated changelogs
๐Ÿ“ Review the changes before merging
โ†“
3

Release Published

Once the Release PR is merged:

  • ๐Ÿ“ฆ Packages published to npm (if NPM_TOKEN provided)
  • ๐Ÿท๏ธ GitHub release created (if GITHUB_TOKEN provided)
  • ๐ŸŽ‰ Version tags pushed to repository
๐Ÿš€ Your release is live!

๐Ÿ“– Quick Start

๐Ÿ’ก

It's recommended to run lazy-release in a CI/CD environment (like GitHub Actions) for automated and consistent release workflows.

1. Install the CLI

pnpm i @lazy-release/cli -D

2. Add a script to your package.json

{
  "scripts": {
    "lazy-release": "lazy-release"
  }
}

3. Run the CLI

pnpm lazy-release \
  --npm-token $NPM_TOKEN \
  --github-token $GITHUB_TOKEN \
  --access public

โš™๏ธ Prerequisites

1. Use squash merge for pull requests

In your repo settings:

  • Go to Settings โ†’ General โ†’ Pull Requests
  • Uncheck "Allow merge commits"
  • Check "Allow squash merges"
  • Choose "Pull request title" for default commit message

2. Update workflow permissions

  • Go to Settings โ†’ Actions โ†’ General
  • Set "Workflow permissions" to "Read and write permissions"
  • Check "Allow GitHub Actions to create and approve pull requests"