📡 PyPI
Publishing your package to PyPI is handled by .github/workflows/pypi-publish.yml,
which combines automated release management with Trusted Publishing — no API tokens required.
How Releases Work
- Push commits to
mainwith Conventional Commits messages (feat:,fix:, ...). - python-semantic-release
determines the next version, updates
pyproject.tomlandCHANGELOG.md, and creates av*.*.*tag. - The tag triggers the publish workflow, which builds the package, generates PEP 740 attestations, and uploads it to PyPI via Trusted Publishing. A GitHub Release with the built artifacts is created automatically.
One-Time Setup: Trusted Publishing
- On PyPI, open your project and go to Publishing.
- Click Add a new trusted publisher and fill in:
- Workflow name:
pypi-publish.yml - Environment:
pypi - Repository:
<owner>/<repository> - Done — no
PYPI_TOKENsecret needed. OIDC handles authentication.
[!note] If you prefer an API token instead, set the
PYPI_TOKENsecret and it will be used as a fallback byuv publish.
PyPI Testing
PyPI has a test package publishing index for you to work through any kinks before you go live. Point the publish job at it with:
uv publish --publish-url https://test.pypi.org/legacy/