This guide consolidates the full release and deployment process for the Cloud SDK for Python, including versioning policy, preparation steps, tagging, GitHub release notes, and artifact publication.
- We follow SemVer: MAJOR.MINOR.PATCH (see SemVer)
-
Create a feature branch from main
git checkout main && git pull git checkout -b branch-name -
Bump version
- In
pyproject.toml: setproject.version = "X.Y.Z"(PEP 440; no leading 'v') - Run
uv lockso the project version inuv.lockmatches - Use
X.Y.Zrc1,X.Y.Zrc2, and so on for release candidates
- In
-
Commit changes
git add pyproject.toml uv.lock git commit -m "feat: did something" -
Push and open PR, get approval and merge
git push -u origin branch-name
- Merge commit message should follow Conventional Commits
- Example:
feat(): add xyz - See: Conventional Commits
After the first release candidate (X.Y.Zrc1), that release line is feature-frozen. If a blocking issue requires a code change, publish and validate another release candidate (X.Y.Zrc2, X.Y.Zrc3, and so on) before the stable release.
To promote the final release candidate, open a pull request that changes the version from X.Y.ZrcN to X.Y.Z and updates uv.lock. The stable release should otherwise contain the same code as the final release candidate.
-
Create GitHub release (this will automatically publish to PyPI)
- Go to the repository's Releases page
- Click "Draft a new release"
- Create or select the tag that exactly matches the project version with a leading
v - Target the merged release commit on
main - Fill in the release title:
vX.Y.Z - Month D, YYYY - For an RC, select Set as a pre-release and do not set it as latest
- Add release notes:
- Highlight key features and changes
- Include breaking changes (if any)
- Reference relevant issues/PRs
- Click "Publish release"
-
Automated PyPI publication
- The Publish Package to PyPI workflow will automatically trigger
- The workflow will:
- Extract version from
pyproject.toml - Check if version already exists on PyPI (prevents duplicates)
- Build the package with
uv build - Publish to PyPI using trusted publishing (OIDC)
- Extract version from
- Monitor the workflow in the Actions tab to confirm successful publication
- Package will be available at:
https://pypi.org/project/sap-cloud-sdk/X.Y.Z/
Note: The version in
pyproject.tomlmust match the release tag (without the 'v' prefix). For example, tagvX.Y.Zrequiresversion = "X.Y.Z"inpyproject.toml.
Install a specific release candidate explicitly:
pip install sap-cloud-sdk==1.0.0rc1Install the current stable release normally:
pip install sap-cloud-sdk