- Add ci.yml for continuous integration on every commit - Test builds on Ubuntu/macOS with Python 3.9/3.10/3.11 - Ensure code quality before any release - Add release-manual.yml for controlled releases - Manual trigger prevents accidental releases - Version validation and tag creation - Optional TestPyPI testing before production - Only creates tag after validation passes - Keep build-and-publish.yml for automated PyPI deployment - Triggered by new tags (separation of concerns) - Handles multi-platform wheel building - Allows retry if PyPI upload fails - Update RELEASE.md with clear prerequisites and workflow This setup ensures: 1. Every commit is tested (CI) 2. Releases are deliberate (manual trigger) 3. Failed CI won't create broken tags 4. PyPI publish can be retried independently
2.0 KiB
2.0 KiB
Release Guide
📋 Prerequisites
Before releasing, ensure:
- ✅ All code changes are committed and pushed
- ✅ CI has passed on the latest commit (check Actions)
- ✅ You have determined the new version number
🚀 Recommended: Manual Release Workflow
Via GitHub UI (Most Reliable)
- Verify CI Status: Check that the latest commit has a green checkmark ✅
- Go to Actions → Manual Release
- Click "Run workflow"
- Enter version (e.g.,
0.1.1) - Toggle "Test on TestPyPI first" if desired
- Click "Run workflow"
What happens:
- ✅ Validates version format
- ✅ Updates all package versions
- ✅ Optionally tests on TestPyPI
- ✅ Creates tag and GitHub release
- ✅ Automatically triggers PyPI publish
Via Command Line
gh workflow run release-manual.yml -f version=0.1.1 -f test_pypi=true
⚡ Quick Release (One-Line)
For experienced users who want the fastest path:
./scripts/release.sh 0.1.1
This script will:
- Update all package versions
- Commit and push changes
- Create GitHub release
- CI automatically builds and publishes to PyPI
⚠️ Note: If CI fails, you'll need to manually fix and re-tag
Manual Testing Before Release
For testing specific packages locally (especially DiskANN on macOS):
# Build specific package locally
./scripts/build_and_test.sh diskann # or hnsw, core, meta, all
# Test installation in a clean environment
python -m venv test_env
source test_env/bin/activate
pip install packages/*/dist/*.whl
# Upload to Test PyPI (optional)
./scripts/upload_to_pypi.sh test
# Upload to Production PyPI (use with caution)
./scripts/upload_to_pypi.sh prod
First-time setup
-
Install GitHub CLI:
brew install gh gh auth login -
Set PyPI token in GitHub:
gh secret set PYPI_API_TOKEN # Paste your PyPI token when prompted