This GitHub Action consists of two major components:
- Scan all commits in your Pull Request against the Conventional Commits standard
- Create GitHub Releases based on unreleased Conventional Commits
It is possible to apply the following version scheme(s):
These are minimal examples; see the actions' respective documentation for more options and details.
The commisery-action
supports a configuration file, allowing you to:
- Change which rules should be enabled for commit message validation
- Add additional Conventional Commit types
- Change the versioning strategy
Please refer to the documentation for more details
The following example workflow will trigger on pull request creation/modification and verify all associated commit messages.
name: Commisery
on:
pull_request:
jobs:
commit-message:
name: Conventional Commit compliance
runs-on: ubuntu-latest
steps:
- name: Check for Conventional Commit compliance
uses: tomtom-international/commisery-action@v2
with:
token: ${{ github.token }}
See the documentation for more information and all possible options for commit message validation.
The following bumps the version according to the Conventional Commits between HEAD and the latest SemVer tag (granted one is present).
name: Bump version
on:
push:
branches: [ main ]
jobs:
bump-version:
name: Bump version and release
runs-on: ubuntu-latest
steps:
- name: Release version
id: release-version
uses: tomtom-international/commisery-action/bump@v2
with:
token: ${{ github.token }}
create-release: true # OPTIONAL, default: `false`
create-release: false # OPTIONAL, default: `false`
- run: echo "Current version is ${{steps.release-version.outputs.current-version}}"
- if: steps.release-version.outputs.next-version != ''
run: echo "Version bumped to ${{steps.release-version.outputs.next-version}}"
More info on the bump action and the available options here
You can find more information on how to use the CLI on the dedicated page