Publishing is tag-driven and uses PyPI Trusted Publishing. No long-lived PyPI token belongs in GitHub, a local environment, or this repository.
- Create the public SDK repository and make this directory its root.
- Protect
mainand require thePython SDK CIchecks. - Create a GitHub environment named
pypiwith a required human reviewer. - Register the PyPI Trusted Publisher for package
kanopy-ai, workflowrelease.yml, and environmentpypi. - Protect release tags matching
v*.
- Choose the version and update both
setup.cfgandsrc/kanopy/__init__.py. - From the private Kanopy development repository, run
./scripts/sync_public_openapi.sh, then review and commit the SDK fixture. - Run
./scripts/run_local_smoke.shagainst the current backend Docker build. - Run
python -m pytest, Ruff checks, and a clean package build. - Merge through the protected
mainbranch and confirm CI passes. - Create and push the matching tag, for example
v0.1.0. - Review and approve the
pypideployment environment. - Install the exact published version into a clean environment and run the read-only identity/project-list smoke check against staging.
The release job rebuilds nothing after approval: the publishing job downloads the exact wheel and source distribution produced and inspected by the build job. Trusted Publishing also creates PyPI attestations by default.