This project uses hatch-vcs — the git tag is the single source of truth for
the version. There is no version string in any file to maintain manually.
Both Test PyPI and PyPI use OIDC trusted publishing (no API tokens needed).
-
Test PyPI: Go to https://test.pypi.org/manage/project/plone.pgcatalog/settings/publishing/
- Add a GitHub publisher: owner=
bluedynamics, repo=plone-pgcatalog, workflow=release.yaml, environment=release-test-pypi
- Add a GitHub publisher: owner=
-
PyPI: Go to https://pypi.org/manage/project/plone.pgcatalog/settings/publishing/
- Add a GitHub publisher: owner=
bluedynamics, repo=plone-pgcatalog, workflow=release.yaml, environment=release-pypi
- Add a GitHub publisher: owner=
-
GitHub Environments: In the repo settings, create two environments:
release-test-pypirelease-pypi(optionally add required reviewers for extra safety)
uv tool install hatch # optional, for local buildsgit checkout main
git pull
pytestTags must follow PEP 440. The v prefix is optional but conventional:
git tag v0.1.0For pre-releases:
git tag v0.1.0a1 # alpha
git tag v0.1.0b1 # beta
git tag v0.1.0rc1 # release candidategit push origin v0.1.0This triggers the release workflow, which builds the sdist + wheel and publishes to PyPI (or Test PyPI for pre-release tags, depending on workflow configuration).
- Go to https://github.com/bluedynamics/plone-pgcatalog/releases/new
- Select the tag you just pushed:
v0.1.0 - Set the release title:
v0.1.0 - Add release notes (or use "Generate release notes")
- For pre-releases, check "Set as a pre-release"
- Click "Publish release"
- Check https://pypi.org/project/plone.pgcatalog/ for the new version
- Verify installation:
uv pip install plone.pgcatalog==0.1.0
hatch build # creates sdist + wheel in dist/
ls dist/
# plone.pgcatalog-0.1.0.tar.gz
# plone.pgcatalog-0.1.0-py3-none-any.whlNote: Without a git tag on the current commit, hatch-vcs generates a dev
version like 0.0.1.dev42+gabcdef0. This is expected and correct for
development builds.
| Artifact | Contents |
|---|---|
sdist (.tar.gz) |
Source code, excluding example/ |
wheel (.whl) |
Pure Python wheel (py3-none-any), the plone.pgcatalog package |
- All tests pass (
pytest) - README.md is up to date
-
mainbranch is clean (no uncommitted changes) - Tag follows PEP 440 (
v0.1.0, not0.1.0orrelease-0.1.0) - GitHub Release created with release notes
- Package visible on PyPI