automated releases based on conventional commits
automated releases based on conventional commits
Automate releases with Conventional Commit Messages.
.github/workflows/release-please.yml file with these contents:… Specifying a release-type configuration is the most straight-forward
configuration option, but allows for no further customization. For advanced
configuration options, see the Advanced Configuration section
For any advanced configuration, please set up a manifest config and then configure this action as follows:
#...(same as above)
steps:
- uses: googleapis/release-please-action@v4
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
# optional. customize path to release-please-config.json
config-file: release-please-config.json
# optional. customize path to .release-please-manifest.json
manifest-file: .release-please-manifest.json| input | description |
|---|---|
token |
A GitHub secret token, the action defaults to using the special secrets.GITHUB_TOKEN |
release-type |
If specified, defines the release strategy to use for the repository. Reference Release types supported |
path |
create a release from a path other than the repository's root |
target-branch |
branch to open pull release PR against (detected by default) |
config-file |
Path to the release-please config in the repository. Defaults to release-please-config.json |
manifest-file |
Path to the release-please versions manifest. Defaults to .release-please-manifest.json |
repo-url |
GitHub repository name in the form of <owner>/<repo>. Defaults to the repository the action is running in. |
github-api-url |
Override the GitHub API URL. |
github-graphql-url |
Override the GitHub GraphQL URL |
fork |
If true, send the PR from a fork. This requires the token to be a user that can create forks (e.g. not the default GITHUB_TOKEN) |
include-component-in-tag |
If true, add prefix to tags and branches, allowing multiple libraries to be released from the same repository |
proxy-server |
Configure a proxy server in the form of <host>:<port> e.g. proxy-host.com:8080 |
skip-github-release |
If true, do not attempt to create releases. This is useful if splitting release tagging from PR creation. |
skip-github-pull-request |
If true, do not attempt to create release pull requests. This is useful if splitting release tagging from PR creation. |
skip-labeling |
If true, do not attempt to label the PR. |
changelog-host |
The proto://host where commits live. Defaults to ${{ github.server_url }} (usually https://github.com) |
versioning-strategy |
The versioning strategy to use. Defaults to default |
release-as |
The version to release as. |
release-please requires a GitHub token to access the GitHub API. You configure this token via
the token configuration option.
If your repository is in an organization, you may need to permit github actions to create an approve PRs.
[!WARNING]
If using GitHub Actions, you will need to specify atokenfor your workflows to run on Release Please's releases and PRs. See the heading below.
By default, Release Please uses the built-in GITHUB_TOKEN secret. However, all resources created
by release-please (release tag or release pull request) will not trigger future GitHub actions workflows,
and workflows normally triggered by release.created events will also not run.
From GitHub's
docs:
When you use the repository's
GITHUB_TOKENto perform tasks, events triggered by theGITHUB_TOKENwill not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.
You will want to configure a GitHub Actions secret with a Personal Access Token if you want GitHub Actions CI checks to run on Release Please PRs.
This workflow will need the following permissions in your workflow file:
permissions:
contents: write
issues: write
pull-requests: writeYou may also need to set "Allow GitHub Actions to create and approve pull requests" under repository Settings > Actions > General.
For more information about permissions:
contents permissionpull_requests permissionGITHUB_TOKENRelease Please automates releases for the following flavors of repositories:
New types of releases can be added here.
You can also find them in the release-please repository.
Properties that are available after the action executed.
| output | description
No open issues yet, or sync has not completed.