Release Please Action
Automate releases with Conventional Commit Messages.
Setting up this action
-
If you haven't already done so, create a
.github/workflowsfolder in your repository (this is where your actions will live). -
Now create a
.github/workflows/release-please.ymlfile with these contents:on: push: branches: - master name: release-please jobs: release-please: runs-on: ubuntu-latest steps: - uses: bcoe/release-please-action@v1.0.1 with: token: ${{ secrets.GITHUB_TOKEN }} release-type: node package-name: release-please-action -
Merge the above action into your repository and make sure new commits follow the Conventional Commits convention, release-please will start creating Release PRs for you.
Configuration
| Variable | Description |
|---|---|
| token | A GitHub secret token, you will most likely want to use the special secrets.GITHUB_TOKEN |
| release-type | What type of project is this a release for? Currently we support node, ruby, python, terraform-module, new types of releases can be added here |
| package-name | A name for the artifact releases are being created for (this might be the name field in a setup.py or package.json) |
| bump-minor-pre-major | Should breaking changes before 1.0.0 produce minor bumps? Default No |
How release please works
Release Please automates CHANGELOG generation, the creation of GitHub releases, and version bumps for your projects. Release Please does so by parsing your git history, looking for Conventional Commit messages, and creating release PRs.
What's a Release PR?
Rather than continuously releasing what's landed to your default branch, release-please maintains Release PRs:
These Release PRs are kept up-to-date as additional work is merged. When you're ready to tag a release, simply merge the release PR.
How should I write my commits?
Release Please assumes you are using Conventional Commit messages.
The most important prefixes you should have in mind are:
fix:which represents bug fixes, and correlates to a SemVer patch.feat:which represents a new feature, and correlates to a SemVer minor.feat!:, orfix!:,refactor!:, etc., which represent a breaking change (indicated by the!) and will result in a SemVer major.
License
Apache Version 2.0