AutoRel is a fast, simple, and reliable tool for automating releases based on commit messages.
It follows Conventional Commits and Semantic Versioning to do things like:
- Run pre-release tasks (tests, builds, etc.)
- Bump the version and tag based on commit messages
- Create tagged GitHub releases with changelog notes
- Publish to npm registry (or other package managers)
- Run custom scripts or commands with the new version number available as an environment variable
Like semantic-release
or release-please
, but faster, more reliable, and easier to use.
Supports GitHub Actions and npm (Node.js) natively. You can add custom scripts for other languages and systems (or contribute built-in support).
Use AutoRel to save time, prevent broken releases, and ship with confidence.
✅ Conventional Commit & SemVer Compliant
- 100% compliant with Conventional Commits and SemVer out of the box, including "!" for breaking changes
🔒 Safe & Reliable
- Automatic rollback on failure
- No confusing configuration files or complex setup
- Configuration validation and error handling
- Excellent test coverage
🚀 Fast & Lightweight
- Minimal dependencies and fast, concurrent execution
- Written in TypeScript with comprehensive test coverage
- No need to install or configure a separate CI/CD system
- Less broken builds and more time to focus on your code!
Read our FAQ on why you should use AutoRel and how it compares to other tools
npx autorel@^2 --publish --run 'echo "Next version is ${NEXT_VERSION}"'
This will:
- Bump the version based on the commit messages since the last release
- Create a new release on GitHub with Release Notes
- Update package.json and publish the release to NPM (does not commit the change to the repository, see below)
- Run the command
echo "Next version is ${NEXT_VERSION}"
However, we recommend you simply call npx autorel@^2
in your CI/CD pipeline (or locally) and set your configuration in the .autorel.yaml
file like so:
# .autorel.yaml
publish: true
run: |
echo "Next version is ${NEXT_VERSION}"
⚠️ If using thenpx
command, you may want to append the version number to prevent breaking changes in the future. You can do this by appending@^
followed by the major version number, ie.npx autorel@^2
.
See Usage and Configuration Options for more information.
Commit messages are parsed to automatically determine the version bump and generate the changelog.
They must follow the Conventional Commits standard specification.
Here are some examples of commit messages and the resulting version bump (with the default configuration):
fix: fix a bug
->0.0.1
(patch)feat: add new feature
->0.1.0
(minor)feat!: add breaking change
->1.0.0
(major)
See our default configuration for more details on how commit types are mapped to version bumps and the changelog.
You can find more examples in the Conventional Commits documentation.
- Linux or MacOS (Windows is not officially supported)
- Node.js 14+
- npm 7+
- Git 2.13+
- Bash
- ⭐ Star this repo if you like it!
- 🐛 Open an issue for bugs or suggestions.
- 🤝 Submit a PR to
main
— all tests must pass.
- brek: powerful yet simple configuration library for Node.js. It’s structured, typed, and designed for dynamic configuration loading, making it perfect for securely managing secrets (e.g., AWS Secrets Manager).
- kizu: An easy-to-use, fast, and defensive JS/TS test runner designed to help you to write simple, readable, and maintainable tests.
- cjs-mock: NodeJS module mocking for CJS (CommonJS) modules for unit testing purposes.
- jsout: A Syslog-compatible, simple, and DevOps-friendly logger for Typescript/Javascript projects. Works great with aggregators like Aeroview and CloudWatch.