This document describes the automated release process for the OpenTDF Python SDK using Release Please and GitHub Actions.
The OpenTDF Python SDK uses a dual-branch release strategy with automated publishing:
developbranch: Creates alpha prereleases (e.g.,v1.0.0-alpha.1) → Published to TestPyPImainbranch: Creates stable releases (e.g.,v1.0.0) → Published to PyPI
This ensures that alpha and stable releases have distinct version numbers and publishing destinations, preventing conflicts between development and production releases.
- Purpose: Development and testing
- Release Type: Alpha prereleases (
v1.0.0-alpha.1,v1.0.0-alpha.2, etc.) - GitHub Status: Marked as "pre-release"
- Publishing Target: TestPyPI (test.pypi.org)
- Trigger: Push to
developbranch with conventional commits
- Purpose: Production releases
- Release Type: Stable releases (
v1.0.0,v1.0.1, etc.) - GitHub Status: Marked as stable release
- Publishing Target: PyPI (pypi.org)
- Trigger: Push to
mainbranch with conventional commits
✅ All tests must pass before any release:
- Unit tests via GitHub Actions test suite
- Integration tests
- Code quality checks (linting, formatting)
-
Commit with Conventional Commit Messages to
developbranch:git checkout develop git commit -m "feat: add new encryption algorithm support" git commit -m "fix: resolve TDF decryption issue with large files" git push origin develop
-
Automated Process:
- Release Please creates a PR with alpha version bump and changelog
- Once PR is merged, GitHub Actions automatically:
- Runs full test suite
- Builds the package
- Creates GitHub release marked as "pre-release"
- Publishes to TestPyPI (if version > 0.3.2)
Note: The develop branch uses separate configuration files (.release-please-config-develop.json and .release-please-manifest-develop.json) to ensure proper alpha version tracking independent of the main branch.
-
Merge from develop (or commit directly):
git checkout main git merge develop # OR make direct commits with conventional commit messages git commit -m "feat: stable feature ready for production" git push origin main
-
Automated Process:
- Release Please creates a PR with stable version bump and changelog
- Once PR is merged, GitHub Actions automatically:
- Runs full test suite
- Builds the package
- Creates GitHub release marked as stable
- Publishes to PyPI
Release Please uses manifest files to track the "last released version" for each branch:
.release-please-manifest.json: Tracks the last stable release from main branch.release-please-manifest-develop.json: Tracks the last alpha release from develop branch
When Release Please runs, it:
- Reads the manifest to find the last released version
- Analyzes conventional commits since that version
- Calculates the next version based on commit types (feat, fix, etc.)
- For develop branch: Applies alpha suffix due to prerelease configuration
- Format:
vX.Y.Z-alpha.N(e.g.,v0.3.1-alpha.1,v0.3.1-alpha.2) - Automatically incremented by Release Please using separate configuration files
- Marked as pre-release on GitHub
- Published to TestPyPI
- Tracked independently from main branch versions
- Format:
vX.Y.Z(e.g.,v0.3.1,v0.3.2) - Follow semantic versioning
- Marked as stable release on GitHub
- Published to PyPI
- Use main branch configuration files
You can manually trigger releases via GitHub Actions:
- Go to Actions → "Release Please" → "Run workflow"
- Select the appropriate branch (
developfor alpha,mainfor stable)
Release Please determines version bumps based on commit message types:
feat:→ Minor version bump (new features)fix:→ Patch version bump (bug fixes)BREAKING CHANGE:→ Major version bump (breaking changes)docs:,chore:,style:→ No version bump
Examples:
git commit -m "feat: add support for new TDF format" # Minor bump
git commit -m "fix: resolve memory leak in encryption" # Patch bump
git commit -m "feat!: redesign SDK API (BREAKING CHANGE)" # Major bump# Install from TestPyPI (alpha versions use the format X.Y.Z-alphaX)
pip install --index-url https://test.pypi.org/simple/ otdf-python==0.3.1a1
# Test functionality
python -c "import otdf_python; print('Alpha version works!')"# Install from PyPI
pip install otdf-python==0.3.1
# Test functionality
python -c "import otdf_python; print('Stable version works!')"This repository manages two packages:
otdf-python(main SDK)otdf-python-proto(protobuf submodule)
Release Please automatically updates version references in both packages using the extra-files configuration.
- Verify commits use conventional commit format
- Check that tests pass in GitHub Actions
- Ensure commits were pushed to the correct branch
- Check GitHub Actions logs for detailed error messages
- Verify PyPI trusted publisher configuration
- Ensure version doesn't already exist on the target repository
- Error: "Missing required manifest versions": Ensure both
.release-please-config-develop.jsonand.release-please-manifest-develop.jsonare committed to the repository - Dynamic file creation errors: The develop-specific configuration files must exist in the repository, not generated at runtime
- Wrong branch configuration: Verify the workflow uses the correct config and manifest files for each branch
- Alpha and stable releases use separate configuration and manifest files to prevent conflicts
- Develop branch uses
.release-please-config-develop.jsonand.release-please-manifest-develop.json - Main branch uses
.release-please-config.jsonand.release-please-manifest.json - If conflicts occur, check the appropriate Release Please configuration files for the target branch
# Create hotfix directly on main
git checkout main
git commit -m "fix: critical security vulnerability"
git push origin main
# Release Please will create a patch release.release-please-config.json: Main branch release configuration (stable releases).release-please-manifest.json: Main branch version tracking.release-please-config-develop.json: Develop branch release configuration (alpha releases).release-please-manifest-develop.json: Develop branch version tracking.github/workflows/release-please.yaml: GitHub Actions workflow
For release issues:
- Check GitHub Actions logs in the "Release Please" workflow
- Review the Release Please documentation
- Create a GitHub issue with workflow logs
- Contact repository maintainers