Releasing CheckMAITE
Use the manual publish jobs only after the release tag already exists on main.
Pushing the tag does not publish to TestPyPI or PyPI by itself.
One-time setup
- Protect release tags, for example
[0-9]*, with create access limited to Maintainers and delete access set to No one. - Protect the
pypi-productionenvironment and require approvals before deployment.
Publishing uses GitLab CI/CD variables named TEST_PYPI_API_TOKEN and
PYPI_API_TOKEN because PyPI/TestPyPI have not yet onboarded gitlab.jatic.net
as a trusted self-managed GitLab issuer. Store both tokens as masked/protected
variables.
Release steps
- Add a
## [X.Y.Z] - YYYY-MM-DDsection toCHANGELOG.md, then create and push an unprefixed, lightweight (no-a) release-shaped version tag, for example1.2.3, from a commit onmain. - In GitLab, open CI/CD → Pipelines → Run pipeline.
- Select branch
main, setRELEASE_TAGto the tag, and create the web pipeline. - In the pipeline, trigger the manual
publish-testpypijob. This publishes to TestPyPI and saves the builtdist/artifacts. - Pull the release from TestPyPI and confirm the package works properly. The
production
publish-pypijob remains manual and blocked untilpublish-testpypisucceeds. - Go back to the CI pipeline and trigger the manual
publish-pypijob. Approve the protectedpypi-productiondeployment if prompted. - Verify the final package at https://pypi.org/project/checkmaite/. After
publish-pypisucceeds, thecreate-gitlab-releasejob creates the GitLab Release from the tag'sCHANGELOG.mdsection; retrying it is safe once the Release exists. - Pull the release from PyPI and confirm the package works properly.