Skip to content

Automates versioning, publishing, and creating changelogs for Node.js projects using conventional commits and supports multi-package repos.

License

Notifications You must be signed in to change notification settings

lazy-release/lazy-release

Repository files navigation

🚀 lazy-release

Contributors Welcome NPM Version GitHub License

Automates versioning, publishing, and creating changelogs for Node.js projects using conventional commits and supports multi-package repos.

✨ 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

📚 Documentation

⚙️ 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
  1. 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"

📖 Quick Start

Note

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
  1. Add a script to your package.json:
{
  "scripts": {
    "lazy-release": "lazy-release"
  }
}
  1. Run the CLI:
pnpm lazy-release --npm-token $NPM_TOKEN --github-token $GITHUB_TOKEN --access public

🔄 Workflow

  1. A dev merges a Pull Request into the main branch using squash merge.

Note

The PR should be prefixed with conventional commit prefix e.g "fix", "chore", "feat", etc...

  1. A Release PR gets created. release-pr

A Release PR....

  • Bumps the version in the package.json files
  • Updates the lock files
  • Creates or updates changelogs changelogs
  1. A release is created once the Release PR is merged. A release is...
  • Publishing packages to npm (If you provide a NPM_TOKEN and the package.json does not have "private": true)
  • Creates a GitHub release (If you provide a GITHUB_TOKEN) github-release

🌟 Projects Using lazy-release

Note

If you are using lazy-release in your project, please consider adding it to this list by submitting a pull request!

💡 This tool was inspired by

  • Vue.js (Their nice changelogs)
  • Nuxt.js (Release PRs, use of emojis etc)

About

Automates versioning, publishing, and creating changelogs for Node.js projects using conventional commits and supports multi-package repos.

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •  

Languages