Releasing (maintainers)¶
Nothing is published automatically. A release is a deliberate, manual sequence; every publishing step needs a maintainer's approval.
One-time setup¶
- PyPI / TestPyPI accounts with two-factor authentication.
- Trusted Publishers (no API tokens): on https://test.pypi.org and https://pypi.org, add a pending publisher
for project
bimora-open-source, owneradelkazemi1, repositorybimora-open-source, workflowrelease.yml, environmenttestpypi(TestPyPI) orpypi(PyPI). - GitHub environments
testpypiandpypi(repository Settings → Environments) with required reviewers, so every publishing run waits for an explicit approval.
Each release¶
- Update
CHANGELOG.md(move "Unreleased" to the version, add the date) and the version inpyproject.tomlandsrc/bimora/__init__.py. - Make sure CI is green on
main. - Actions → Release → Run workflow with target
testpypi. Approve the environment. The workflow runs the tests, builds, checks the distribution contents and uploads. - Verify in a clean environment:
python -m venv /tmp/check && /tmp/check/bin/python -m pip install \
--index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ bimora-open-source
/tmp/check/bin/bimora --version
- Run the workflow again with target
pypiand approve. - Tag the released commit (
git tag -s v0.1.0) and create the GitHub release fromdocs/release-notes-v0.1.0.md.
PyPI does not allow re-uploading a version; fix problems with a new patch version.