Auto-tag GitLab repos with semantic version tags — one tool, two strategies.
Project description
semvertag
Auto-tag your GitLab repository with semantic version tags from CI — one tool, two strategies.
Install
uvx semvertag tag
Use it in GitLab CI
Paste this job into your .gitlab-ci.yml:
stages: [tag]
semvertag:
stage: tag
image: python:3.13-slim
variables:
SEMVERTAG_STRATEGY: branch-prefix # or: conventional-commits
before_script:
- pip install --quiet 'uv>=0.4,<1'
script:
- uvx 'semvertag>=0.1,<1' tag
rules:
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
It runs uvx semvertag tag against your repo on the default branch.
semvertag inspects the latest commit + tag history, decides the
appropriate semver bump, and creates the new tag via the GitLab API.
A one-line
include: - component: …via the GitLab CI Catalog will replace this snippet once the component is published. For now, paste the job inline.
Strategies
- branch-prefix (default): the latest commit on the default branch
must be a merge commit whose source branch starts with
feature/(minor),bugfix/, orhotfix/(patch). - conventional-commits: parses the latest commit's
Conventional Commits
header (
feat:minor,fix:/perf:patch,!orBREAKING CHANGE:major).
Both are configurable via env vars. See docs for the full configuration surface.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file semvertag-0.1.1.tar.gz.
File metadata
- Download URL: semvertag-0.1.1.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ddc495992a1e0b3c084e1ef21864b8d73dd1ecfc56e27c929e9c61e9db1baa8
|
|
| MD5 |
39f7157e714310cc2a86df2672a178b2
|
|
| BLAKE2b-256 |
57c7ae42c3e61e1c39cedb7a3a42b7f1dad4a82b26af0e84e3aa8b77d5183573
|
File details
Details for the file semvertag-0.1.1-py3-none-any.whl.
File metadata
- Download URL: semvertag-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65b41defcf588d47503f3dbfa3bbbf9062f7c6695a13120b0e613e2e90327a7c
|
|
| MD5 |
48e70eb484923df25a1ef894feeed5db
|
|
| BLAKE2b-256 |
7dbf03db95580b2ca3218d4a016092a60e75f9ec31a8a38e0a458e7aa1e10423
|