Quick Release
Releasing a new version is simple and fully automated:Configure release
Select the following options:
- bump_type: Choose
patch,minor, ormajor - skip_publish: Leave unchecked (false) for production release
What the Workflow Does
The release workflow performs the following steps automatically:Version Bump
Uses
just bump <type> which:- Runs
cz bump(commitizen) to update version numbers - Creates a git commit and tag
- Updates main project’s
uv.lockfile - Updates notebook
pyproject.tomlfiles (locks updated later) - Amends everything into a single atomic commit
Testing & Building
- Runs full test suite (
just test) - Builds the package (
just build) - Tests the built package can be imported
- Verifies the version number is correct
Publishing
- Pushes the commit and tags to main branch
- Uploads the package to PyPI (unless
skip_publish=true) - Creates a GitHub release with auto-generated changelog
Testing a Release
Before releasing to production, you can test the release process without making permanent changes:Run workflow in test mode
When running the Release workflow, set skip_publish to
true (check the box)What gets tested
The workflow will:
- ✅ Test version bumping and dependency updates
- ✅ Build and validate the package
- ❌ Skip git commits/pushes (no permanent changes)
- ❌ Skip PyPI upload
- ❌ Skip GitHub release creation
- ❌ Skip notebook lock file updates
Manual Release Steps
If you need to release manually (for example, if the GitHub Actions workflow is unavailable):Version Bumping
The project uses Commitizen for version management.Available Commands
What Gets Updated
Commitizen automatically updates version numbers in multiple files:pyproject.toml: Main project versionsrc/syft_flwr/__init__.py: Package__version__variablenotebooks/*/pyproject.toml: Notebook dependency versions
pyproject.toml:
pyproject.toml
Troubleshooting
Notebook lock updates fail
Notebook lock updates fail
Problem: Notebook lock file updates fail after publishing.Solution: The new version might not be available on PyPI yet. Wait a few minutes and run manually:
Tests fail during release
Tests fail during release
Problem: Release workflow fails because tests don’t pass.Solution:
- Fix the failing tests before attempting release
- The workflow will abort if tests fail
- Never bypass failing tests in production releases
PyPI upload fails
PyPI upload fails
Problem: Package upload to PyPI fails.Possible causes:
OM_PYPI_TOKENsecret is not set or invalid in repository settings- The version already exists on PyPI (versions are immutable)
- Network or PyPI service issues
- Verify the PyPI token is correctly configured
- Check if the version exists at https://pypi.org/project/syft-flwr/
- If version exists, bump to a higher version
Version conflicts
Version conflicts
Problem: Version number already exists or conflicts.Solution:
- PyPI versions are immutable and cannot be reused
- Bump to a higher version number
- Use
just show-versionto check current version - Use
just bump-dry patchto preview next version
Git tag already exists
Git tag already exists
Problem: Git tag for version already exists.Solution:
Development Workflow
The recommended workflow for development and releases:
This ensures the main branch is always releasable and dependencies stay in sync.
Required Secrets
The following GitHub repository secrets must be configured for automated releases:| Secret Name | Description |
|---|---|
OM_PYPI_TOKEN | PyPI API token for uploading packages |
Setting Up PyPI Token
Create PyPI token
- Log in to PyPI
- Go to Account Settings → API tokens
- Click “Add API token”
- Set scope to “Entire account” or specific to “syft-flwr” project
- Copy the token (starts with
pypi-)
Next Steps
- Understand the Versioning strategy
- Review Testing before releases
- Learn about Code Quality checks