This composite GitHub Action calculates the new version using Conventional Commits 1.0 and Semantic Versioning 2.0.0. It uses under the hood ietf-tools/semver-action@1.
The important feature of this action is that it appends the suffix to the version, based on current branch.
- If the branch is the default one, it doesn't append anything. So e.g.
1.2.3
. - Else it appends the short SHA of the commit. So e.g.
1.2.3-abcdef1
. - Additionally you can set flag
pep440-compliant
totrue
to use PEP440 format. So e.g.1.2.3+abcdef1
.
- name: Calculate new version
id: version
uses: cdqag/action-version@v2
Name | Description | Default |
---|---|---|
pep440-compliant |
Use PEP440 format? (1.2.3+dev instead 1.2.3-dev ) |
false |
current-version
- current detected versionnew-version
- new calculated versionnew-major-version
- new calculated major version
CURRENT_VERSION
- current detected versionNEW_VERSION
- new calculated versionNEW_MAJOR_VERSION
- new calculated major version
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.