Releasing Maplibreum
Maplibreum publishes with PyPI Trusted Publishing. The workflow uses short-lived OpenID Connect credentials and does not require a stored PyPI API token.
One-time repository setup
Configure pending trusted publishers before the first upload:
Index |
Project |
Owner |
Repository |
Workflow |
Environment |
|---|---|---|---|---|---|
PyPI |
|
|
|
|
|
TestPyPI |
|
|
|
|
|
Register the PyPI publisher at https://pypi.org/manage/account/publishing/.
Register the TestPyPI publisher at https://test.pypi.org/manage/account/publishing/.
Create matching
pypiandtestpypiGitHub environments.Require manual approval on the production
pypienvironment.Do not add long-lived PyPI tokens to repository secrets.
Release checklist
Update
maplibreum/_version.pyand replace theUnreleasedchangelog entries with a dated version section.Confirm CI is green on the exact
maincommit to release.Run the
Publish Python distributionworkflow manually. Manual runs publish only to TestPyPI.Install from TestPyPI and perform an import/render smoke test. Runtime dependencies may be resolved from PyPI:
python -m venv /tmp/maplibreum-test-release /tmp/maplibreum-test-release/bin/python -m pip install \ --index-url https://test.pypi.org/simple/ \ --extra-index-url https://pypi.org/simple/ \ maplibreum==VERSION /tmp/maplibreum-test-release/bin/python -c \ "from maplibreum import Map, __version__; print(__version__); print(len(Map().render()))"
Create a GitHub release targeting the verified
maincommit with tagvVERSION. Publishing the GitHub release triggers the production PyPI job.Approve the protected
pypienvironment deployment after checking the tag and artifacts.Verify the release from a clean environment with
python -m pip install maplibreum==VERSION.Confirm the PyPI project links, rendered README, source archive, wheel, and digital attestations.
PyPI distributions are immutable. If an upload is wrong, increment the version; do not attempt to replace an existing file.