This guide outlines the release workflow for publishing to GitHub and PyPI.
Before creating a release, confirm:
- Documentation is updated (
README.md,README_EN.md,QUICKSTART.md,docs/USAGE.md) - Package metadata is correct (
pyproject.toml,ai_collab/__init__.py) - Test suite passes
- Build and metadata checks pass
python3 -m pip install --upgrade build twinepytest -qpython3 -m build
python3 -m twine check dist/*Expected result:
- Wheel and sdist are generated
twine checkreturnsPASSED
If the repository is not initialized:
git init
git branch -M mainCreate a release commit and tag:
git add .
git commit -m "chore(release): prepare v0.1.0"
git tag -a v0.1.0 -m "v0.1.0"git remote add origin git@github.com:<your-account>/ai-collab.git
# or
# git remote add origin https://github.com/<your-account>/ai-collab.git
git push -u origin main
git push origin v0.1.0Then create a GitHub Release from the v0.1.0 tag.
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-xxxxxxxxxxxxxxxx
python3 -m twine upload dist/*Optional staged release to TestPyPI:
python3 -m twine upload --repository testpypi dist/*Included workflows:
.github/workflows/ci.yml.github/workflows/publish-pypi.yml
Required secrets:
PYPI_API_TOKENTEST_PYPI_API_TOKEN
python3 -m venv /tmp/ai-collab-verify
source /tmp/ai-collab-verify/bin/activate
python3 -m pip install -U pip
python3 -m pip install ai-collab
ai-collab --help
ai-collab run --help- Never overwrite published artifacts
- Release a patch version (
vX.Y.Z+1) for fixes - Document fixes and migration notes in release notes