- Production PyPI: https://pypi.org/account/register/
- Test PyPI: https://test.pypi.org/account/register/
-
Test PyPI: https://test.pypi.org/manage/account/token/
- Click "Add API token"
- Name:
garde-fou-test - Scope: "Entire account" (or specific to garde-fou project)
- Copy the token (starts with
pypi-)
-
Production PyPI: https://pypi.org/manage/account/token/
- Click "Add API token"
- Name:
garde-fou-prod - Scope: "Entire account" (or specific to garde-fou project)
- Copy the token (starts with
pypi-)
cd python
cp .env.example .envEdit .env and add your tokens:
# PyPI API Tokens
PYPI_API_TOKEN=pypi-your-actual-production-token-here
TEST_PYPI_API_TOKEN=pypi-your-actual-test-token-here.env file to git! It's already in .gitignore.
cd python
python3 release.py patch --testcd python
python3 release.py patchpatch: 0.1.5 → 0.1.6 (bug fixes)minor: 0.1.5 → 0.2.0 (new features)major: 0.1.5 → 1.0.0 (breaking changes)
cd python
python3 bump_version.py patchcd python
python3 -m buildcd python
python3 -m twine upload --repository testpypi dist/* # Test PyPI
python3 -m twine upload dist/* # Production PyPI# From Test PyPI
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ garde-fou
# From Production PyPI
pip install garde-fou
# Test it works
python3 -c "from gardefou import GardeFou; print('✅ Works!')"- Test PyPI: https://test.pypi.org/project/garde-fou/
- Production PyPI: https://pypi.org/project/garde-fou/
✅ No more copy-pasting tokens - Stored securely in .env
✅ One command releases - python3 release.py patch --test
✅ Automatic version bumping - No conflicts
✅ Git integration - Auto-commit and tag
✅ Safe testing - Test PyPI first
✅ Professional workflow - Industry standard