Skip to content

Plugin: updater-python

Updates Python package version metadata in pyproject.toml or a similar backend file. Choose it when your Python release process needs the application version written before packaging or publishing.

Terminal window
semrel plugin install @semrel/updater-python

semrel plugin install downloads the binary to .semrel/plugins/ and updates .semrel.lock. Commit .semrel.lock to pin the version for your team.

Pre-built, signed multi-platform images (linux/amd64, linux/arm64) are published on every release:

Terminal window
docker pull ghcr.io/semrels/updater-python:latest

Verify the image signature with cosign:

Terminal window
cosign verify ghcr.io/semrels/updater-python:latest \
--certificate-identity-regexp 'https://github.com/SemRels/updater-python/.github/workflows/release.yml.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
version: 1
plugins:
- uses: @semrel/updater-python
args:
file: pyproject.toml
backend: pyproject
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnopyproject.tomlPython project metadata file to update.
SEMREL_PLUGIN_BACKENDnopyprojectMetadata backend or update strategy to use.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change version = "1.3.2" to version = "1.4.0" in pyproject.toml.