Home / Maintainers
Publishing to PyPI
For maintainers. Once published, anyone can use it with uv add obskitpy, pip install obskitpy
or uvx obskitpy. The publish.yml workflow uses
Trusted Publishing (OIDC): there is no stored token in GitHub.
One-time setup
- Create an account at https://pypi.org (with 2FA) and open Your projects → Publishing (or https://pypi.org/manage/account/publishing/).
- Under Add a new pending publisher, fill in:
| Field | Value |
|---|---|
| PyPI Project Name | obskitpy |
| Owner | pedrowill-dev |
| Repository name | obskitpy |
| Workflow name | publish.yml |
| Environment name | pypi |
- On GitHub, under Settings → Environments, create the
pypienvironment (optional: tick Required reviewers to require a manual approval before every release).
Publishing a version
# 1. bump the version in obskitpy/pyproject.toml (e.g. 0.1.1) and commit
# 2. create and push the tag
git tag v0.1.1 && git push origin v0.1.1
The workflow builds (uv build) and publishes to PyPI. Follow it under Actions. You cannot republish
the same version: if you make a mistake, bump the number and publish again.
Testing first (optional)
cd obskitpy && uv build && uvx twine check dist/*
uv run --with dist/obskitpy-*.whl --no-project obskitpy --help
To rehearse on TestPyPI, create an equivalent publisher at https://test.pypi.org and add
repository-url: https://test.pypi.org/legacy/ to the pypa/gh-action-pypi-publish step.