A GitHub Action that calculates and applies semantic version tags to repositories based on commit messages. It follows the Conventional Commits specification to determine version increments and supports multiple tag formats including SemVer and PEP440.
- Automatic semantic version calculation from commit messages
- Floating tags for major and minor versions (e.g.,
v1,v1.2) - Support for SemVer and PEP440 formats
- Release candidate tags for pull requests
- Tag persistence across workflow jobs via artifacts
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
fetch-tags: true
- name: Tag
uses: martoc/action-tag@v0- Usage Guide - Detailed usage instructions and examples
- Code Style - Code style guidelines for contributors
| Input | Description | Required | Default |
|---|---|---|---|
skip-push |
Skip pushing tags to remote | No | false |
execute |
Action to perform: tag or load |
No | tag |
format |
Tag format: semver or PEP440 |
No | semver |
| Output | Description |
|---|---|
version |
The calculated version |
TAG_VERSION |
Full version string |
TAG_NAME |
Tag name with v prefix |
TAG_FLOATING_MAJOR_NAME |
Floating major version tag |
TAG_FLOATING_MINOR_NAME |
Floating minor version tag |
The following environment variables are set after execution:
TAG_VERSION- The calculated versionTAG_NAME- Tag name withvprefixTAG_SHA- Git SHA of the tagged commit
This project is licenced under the MIT Licence - see the LICENCE file for details.