What is release-please?
release-please is an automated release tool for GitHub repositories. It automates the process of generating release notes, creating GitHub releases, and versioning based on conventional commits. This helps maintainers streamline their release process and ensure consistency.
What are release-please's main functionalities?
Automated Release Notes
This feature allows you to automatically generate release notes based on the commits in your repository. The code sample demonstrates how to create a GitHub release with release notes.
const { GitHubRelease } = require('release-please');
const githubRelease = new GitHubRelease({
repoUrl: 'https://github.com/owner/repo',
packageName: 'my-package',
token: 'your-github-token'
});
githubRelease.createRelease();
Version Bumping
This feature automates the process of bumping the version of your package based on the commits. The code sample shows how to bump the version of your package.
const { Version } = require('release-please');
const version = new Version({
repoUrl: 'https://github.com/owner/repo',
packageName: 'my-package',
token: 'your-github-token'
});
version.bumpVersion();
Changelog Generation
This feature generates a changelog file based on the commits in your repository. The code sample demonstrates how to generate a changelog.
const { Changelog } = require('release-please');
const changelog = new Changelog({
repoUrl: 'https://github.com/owner/repo',
packageName: 'my-package',
token: 'your-github-token'
});
changelog.generateChangelog();
Other packages similar to release-please
semantic-release
semantic-release automates the versioning and package publishing process based on the commit messages. It is highly configurable and integrates with various CI/CD pipelines. Compared to release-please, semantic-release offers more plugins and customization options.
standard-version
standard-version is a tool for versioning and changelog generation based on conventional commits. It is simpler and more lightweight compared to release-please, making it suitable for smaller projects or those with simpler release requirements.
lerna
lerna is a tool for managing JavaScript projects with multiple packages. It can also handle versioning and changelog generation. While it offers more features for monorepos, it may be overkill for single-package repositories compared to release-please.
release-please
generates GitHub PRs for library releases, based on the
conventionalcommits.org commit
specification.
The generated PR:
-
determines the next version that a library should be released as (based
on SemVer).
-
updates language-specifc files, .gemspec
, package.json
, setup.py
, etc.,
with the appropriate version.
-
generates a CHANGELOG with information pertinent to library consumers.
-
adds labels to the PR, providing contextual information to automation tools furhter
down the pipeline, e.g., autorelease: pending
.
-
github.com/googleapis/release-please
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in Client Libraries Explained.
Table of contents:
Quickstart
Installing the client library
npm install release-please
CLI Commands
When running CLI commands, set the GH_TOKEN
environment variable to
a token you've generated
with write permissions for the repo you're interacting with.
Minting a Release
Generates a new release, based on the commit history since the last release
that was tagged:
release-please mint-release --repo-url=git@github.com:bcoe/my-fake-repo.git
--package-name=@google-cloud/fake --release-type=node
--repo-url
: the GitHub URL of the repository the release is being
generated for.--package-name
: the name of the package that will ultimately be published
(to npm
, PyPi
, RubyGems
, etc.).--release-type
: what type of release is being created, possible values:
node
: a simple Node.js repo (not a mono-repo).
Versioning
This library follows Semantic Versioning.
This library is considered to be in alpha. This means it is still a
work-in-progress and under active development. Any release is subject to
backwards-incompatible changes at any time.
More Information: Google Cloud Platform Launch Stages
Contributing
Contributions welcome! See the Contributing Guide.
License
Apache Version 2.0
See LICENSE