This project follows Semantic Versioning (SemVer) and uses an automated CI/CD pipeline for releases.
The version number follows the MAJOR.MINOR.PATCH format:
- MAJOR: Incompatible API changes.
- MINOR: Add functionality in a backwards-compatible manner.
- PATCH: Backwards-compatible bug fixes.
The Source of Truth for the current version is the version field in the pyproject.toml file.
The release process is fully automated via GitHub Actions using the Publish to PyPI workflow.
Whenever a push occurs on the main branch, the workflow evaluates the version in pyproject.toml:
- Auto-Patch Increment: If the version in
pyproject.tomlis already published (a Git tag exists), the workflow will automatically bump the patch version (e.g.,1.0.1->1.0.2), updatepyproject.toml, push a silent commit tomainwith[skip ci], tag the release, and publish. - Manual Version Bump: If you manually edit
pyproject.tomllocally to a new, unpublished version (e.g.,1.1.0) and push tomain, the workflow detects that this version is new. It skips the auto-increment, tagsv1.1.0, and publishes it directly.
You can manually trigger a release or override the versioning from the GitHub UI, which is particularly useful for major or minor version changes:
- Go to the Actions tab.
- Select Publish to PyPI.
- Click Run workflow.
- Provide a Manual version override (e.g.,
2.0.0) to force a specific version. The workflow will updatepyproject.toml, commit the change, tag the release, and publish.
If you manually create and push a Git tag starting with v* (e.g., git tag v1.2.3 && git push origin v1.2.3), the workflow will instantly build and publish that specific tag exactly as provided, without modifying the source code.
- Rely on Auto-Patch: For small bug fixes and minor updates, you don't need to manually update
pyproject.toml. Simply merge tomainand the system will automatically bump the patch version. - Review Release Notes: After an automated release, review the auto-generated notes on the GitHub Releases page to ensure they accurately reflect the changes.
- PyPI Authentication: This repository uses PyPI Trusted Publishing (OIDC). Ensure Trusted Publishing is properly configured on PyPI to allow GitHub Actions to publish securely without API tokens.