Skip to content

ci: publish the SDK to PyPI on release (trusted publishing) - #66

Merged
prashar32 merged 1 commit into
mainfrom
ci/pypi-publish
Jun 5, 2026
Merged

ci: publish the SDK to PyPI on release (trusted publishing)#66
prashar32 merged 1 commit into
mainfrom
ci/pypi-publish

Conversation

@prashar32

Copy link
Copy Markdown
Owner

Why

The from-source install is clunky:

pip install "git+https://github.com/prashar32/riskkernel.git#subdirectory=sdks/python"

…only because the SDK lives in a monorepo subdirectory, so pip finds no pyproject.toml at the repo root. Publishing to PyPI makes it the ordinary pip install riskkernel — no git URL, no #subdirectory, like any other package.

What

A workflow that builds and publishes the riskkernel SDK to PyPI on every version tag, via PyPI Trusted Publishing (OIDC)no API token or password is stored anywhere. It runs the (stdlib-only) tests, builds an sdist + wheel, and uploads; skip-existing guards re-runs.

One-time setup (PyPI side, mine to do)

The name riskkernel is free on PyPI. Add a pending trusted publisher for it (PyPI → your account → Publishing):

  • Project: riskkernel · Owner: prashar32 · Repository: riskkernel
  • Workflow: python-publish.yml · Environment: (blank)

PyPI claims the name on the first publish. After that, tagging a release publishes the SDK alongside the binaries + image, and the install docs move to pip install riskkernel.

Verified

Installing the SDK from source needs the clunky
`pip install "git+https://...#subdirectory=sdks/python"`, because the package lives
in a monorepo subdirectory and pip can't find a pyproject.toml at the repo root.
Publishing to PyPI makes it the ordinary `pip install riskkernel`.

Adds a workflow that builds and publishes the SDK to PyPI on every version tag,
authenticating with PyPI Trusted Publishing (OIDC) — no API token or password
stored anywhere. It runs the (stdlib-only) tests and builds an sdist + wheel before
uploading; skip-existing guards re-runs.

One-time setup on PyPI: add a pending trusted publisher for `riskkernel` pointing at
this repo and python-publish.yml (the name is free; PyPI claims it on the first
publish). After that, a version tag publishes the SDK next to the binaries and
image, and the install docs become `pip install riskkernel`.
@prashar32
prashar32 merged commit 5ed656d into main Jun 5, 2026
5 checks passed
@prashar32 prashar32 mentioned this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant