Publishing Django Orbit¶
This is the release checklist for publishing Django Orbit to GitHub, PyPI and the public MkDocs site.
Release Order¶
- Merge the release PR into
main. - Pull the final
mainlocally and confirm the version. - Run the full test suite.
- Build the package from a clean
dist/. - Verify the built wheel and sdist.
- Publish to PyPI.
- Create the GitHub release and tag.
- Deploy the documentation site.
- Verify PyPI, GitHub release, docs and a fresh install.
Preflight¶
For release PRs and final publishing, run the local guard before pushing or uploading:
This checks release metadata, runs the test suite, builds docs in strict mode, rebuilds package artifacts and runs Twine checks.
If you only need the lightweight metadata check used by CI:
Confirm these files are aligned before publishing:
pyproject.tomlproject versionorbit/__init__.py__version__CHANGELOG.mdrelease sectionREADME.mdpackage landing pagedocs/andmkdocs.ymlfor user-visible changes
Build¶
python scripts/verify_release.py already cleans old artifacts, builds fresh distributions and runs Twine checks. To run the build steps manually:
Expected files for version X.Y.Z:
dist/django_orbit-X.Y.Z.tar.gzdist/django_orbit-X.Y.Z-py3-none-any.whl
Pull Request Merge Guard¶
Release PRs must have these GitHub checks green before merge:
Release metadataTests / Python 3.9 / Django 4.2 / coreTests / Python 3.10 / Django 4.2 / full+mcpTests / Python 3.12 / Django 5.0 / full+mcpDocumentationPackage build
In GitHub repository settings, configure branch protection for main to require those checks before merge and require branches to be up to date before merging.
Publish to PyPI¶
Use a PyPI project token when prompted:
GitHub Release¶
Create a GitHub release from the same version and changelog section:
The release notes should summarize:
- highlights for users;
- compatibility or migration notes;
- security/safety changes;
- test plan used for the release.
Deploy Documentation¶
Documentation must be deployed from the same code that was released.
Post-Publish Verification¶
Check the public package page:
Test a clean install in a temporary environment:
python -m venv .venv-release-check
.venv-release-check\Scripts\python -m pip install --upgrade pip
.venv-release-check\Scripts\python -m pip install "django-orbit[mcp]==X.Y.Z"
.venv-release-check\Scripts\python -c "import orbit; print(orbit.__version__)"
Verify these public URLs:
- PyPI:
https://pypi.org/project/django-orbit/ - GitHub release:
https://github.com/astro-stack/django-orbit/releases/tag/vX.Y.Z - Docs:
https://astro-stack.github.io/django-orbit/ - MCP docs:
https://astro-stack.github.io/django-orbit/mcp/
If Upload Fails¶
PyPI versions are immutable. If X.Y.Z was already uploaded, bump to the next patch version, update changelog/version files, rebuild and upload again.