Skip to main content

Auto-tag GitLab repos with semantic version tags — one tool, two strategies.

Project description

semvertag

CI codecov

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/, or hotfix/ (patch).
  • conventional-commits: parses the latest commit's Conventional Commits header (feat: minor, fix:/perf: patch, ! or BREAKING CHANGE: major).

Both are configurable via env vars. See docs for the full configuration surface.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semvertag-0.2.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semvertag-0.2.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file semvertag-0.2.0.tar.gz.

File metadata

  • Download URL: semvertag-0.2.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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

Hashes for semvertag-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4dc0408572a52d6fe3cbc1c4fe42ba91a77cb83ff1330dbf7ccb2ce44f03c6eb
MD5 4e577bb4afe55350952e7b5aac2b2f34
BLAKE2b-256 891e29004f3c50b8d43f790a0a034827fbe0d309f05a1d79ae67beab020ca6d5

See more details on using hashes here.

File details

Details for the file semvertag-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: semvertag-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","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

Hashes for semvertag-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bd748db4322f1aab5e478be4da601c26870ee70c9fdda5fa6a8a1180c26c45c
MD5 7cce367a30c241dae4c566d9ad79099c
BLAKE2b-256 a2209e15143547999d1e85a137d0679586027b63a5dbc2afd5a7b2044fcc6a7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page