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).
Requires the Owner role on the project. The publishing settings are not available to Maintainers — if you only have the Maintainer role, ask an owner to add the publisher (or to promote you). On a project that does not exist yet, an owner can instead create a pending publisher, which is converted into a regular one by the first successful upload.
-
Test PyPI: https://test.pypi.org/manage/project/collective.easyformplugin.registration/settings/publishing/
- Add a GitHub publisher: owner=
collective, repo=collective.easyformplugin.registration, workflow=release.yaml, environment=release-test-pypi
- Add a GitHub publisher: owner=
-
PyPI: https://pypi.org/manage/project/collective.easyformplugin.registration/settings/publishing/
- Add a GitHub publisher: owner=
collective, repo=collective.easyformplugin.registration, 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)
Do not finalize the changelog heading before the PyPI publisher is in place —
otherwise the repository claims a released version that cannot be uploaded.
Until then, master keeps publishing dev builds to Test PyPI on every green
CI run, which is a fine preview.
Every change lands in CHANGES.md under the open ## x.y.z (unreleased)
section. To release, promote that heading to the plain version:
## 3.0.0Commit that to master (via a short PR if direct pushes are blocked):
git checkout -b release/3.0.0
git commit -am "Finalize CHANGES for 3.0.0 release"
git push -u origin release/3.0.0CI must be green on master. A green master run also uploads a dev build to
Test PyPI, so you can check the artifact there before releasing.
git checkout master && git pull
git tag -a 3.0.0 -m "Release 3.0.0"
git push origin 3.0.0Then create a GitHub Release from that tag (release notes = the changelog
section). Publishing the release triggers release.yaml, which uploads the
package to PyPI.
- Check https://pypi.org/project/collective.easyformplugin.registration/
- Add a new
## x.y.z (unreleased)section at the top ofCHANGES.md.
- Version is wrong / says
0.1.dev…: the checkout has no tags. All workflows usefetch-depth: 0; keep it that way —hatch-vcsderives the version from the git history. - Test PyPI upload did not run: it is triggered by
workflow_runon the workflow named exactly CI. Renaming that workflow breaks the trigger. - PyPI rejects the upload: trusted publishing must match repo, workflow filename and environment name exactly (see above).