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 and SemVer.
Release Please can be configured (using GitHub Actions,
a cron, or a step during CI/CD) to maintain a PR that represents the next release
or your library.
When the candidate PR is merged, Release Please can be configured to create
a GitHub Release.
Here's an example of Release Please in action.
The Release Please Repository:
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
Maintaining a Release PR
To configure Release Please to maintain an up-to-date release
pull-request on your repository, setup the following command to execute
when changes are pushed to master
:
release-please release-pr --package-name=@google-cloud/firestore" \
--repo-url=googleapis/nodejs-firestore \
--token=$GITHUB_TOKEN
--package-name
: is the name of the package to publish to publish to
an upstream registry such as npm.--repo-url
: is the URL of the repository on GitHub.--token
: a token with write access to --repo-url
.
Creating GitHub Releases
To configure Release Please to generate GitHub Releases when release
pull-requests are merged to master
, setup the following command to
execute when changes are pushed to master
:
release-please github-release --repo-url=googleapis/nodejs-firestore \
--token=$GITHUB_TOKEN
--repo-url
: is the URL of the repository on GitHub.--token
: a token with write access to --repo-url
.
GitHub Actions
An elegant way to configure Release Please
is through
GitHub Actions. To generate a
main.workflow
for Release Please
, simply run:
release-please generate-action --package-name=@google-cloud/firestore"
--package-name
: is the name of the package to publish to publish to
an upstream registry such as npm.
Versioning
This library follows Semantic Versioning.
This library is considered to be in beta. This means it is expected to be
mostly stable while we work toward a general availability release; however,
complete stability is not guaranteed. We will address issues and requests
against beta libraries with a high priority.
More Information: Google Cloud Platform Launch Stages
Contributing
Contributions welcome! See the Contributing Guide.
License
Apache Version 2.0
See LICENSE