How syfthub-sdk gets from sdk/python to PyPI. Releases are driven by a tag; the
release-python-sdk.yml workflow does the rest.
- PyPI trusted publisher. On PyPI, under the
syfthub-sdkproject, add a publisher with ownerOpenMined, repositorysyfthub, workflowrelease-python-sdk.ymland environmentpypi. No long-lived token is stored anywhere. - GitHub environment
pypi. Repository settings, Environments, createpypi. Add required reviewers if releases should wait for approval. - Tag ruleset. Repository settings, Rules, a ruleset for tags matching
python-sdk/v*that restricts creation and deletion to maintainers.
-
Bump
versioninsdk/python/pyproject.toml. For a stable release also set theDevelopment Statusclassifier to5 - Production/Stable. -
Open a pull request, get it reviewed, merge to
main. -
Tag the merge commit and push the tag:
git checkout main && git pull git tag python-sdk/v2.0.0 git push origin python-sdk/v2.0.0 -
Watch "Release Python SDK" under Actions. It checks that the tag matches the version in
pyproject.toml, runs ruff, mypy and the unit tests, builds the wheel and sdist, publishes to PyPI and creates a GitHub Release. -
Verify on https://pypi.org/project/syfthub-sdk/ and with a fresh install.
Semantic Versioning. Pre-releases use PEP 440 suffixes, 2.0.0a1,
2.0.0b1, 2.0.0rc1, and the tag carries the same string: python-sdk/v2.0.0a1. pip
installs a pre-release only with --pre or an explicit pin. Mark the GitHub Release as a
pre-release by hand; the workflow does not do it.
- Version mismatch. The workflow stops when the tag and
pyproject.tomldisagree. Fix the version, merge, delete the tag on the remote and tag again. - Lint or tests fail. Nothing is published. Fix on
main, then move the tag. - A bad release is out. PyPI does not allow unpublishing. Yank the version on PyPI so new installs skip it, then release a patch.
@syfthub/sdk on npm and the Go module are no longer released. The TypeScript client lives in
components/frontend/src/lib/sdk and ships inside the frontend image; the last published versions and
the Go SDK are kept on the legacy-sdks branch.
The desktop app (desktop/v* releases) was removed in #247; its releases stay downloadable, but
nothing builds it any more.