Release Automation (Packaging & Publishing)
This tutorial shows how to build a wheel and prepare a release using hatchling and twine, and how to integrate this into CI.
Steps:
- Build a wheel locally:
python -m build --wheel
- Verify the package:
python -m pip install dist/ciri-copilot-*.whl
- Upload to PyPI using twine (use API token stored in CI secrets):
twine upload dist/* -u __token__ -p $PYPI_API_TOKEN
CI recommendations:
- Use GitHub Actions with job matrix for platforms and Python versions
- Use
actions/setup-pythonand cache pip - Use
pypa/gh-action-pypi-publishor twine with secrets
Mermaid flow