Skip to content

ci: publish v* releases to PyPI by trusted publishing - #90

Merged
timtreis merged 1 commit into
mainfrom
ci/pypi-release
Nov 19, 2026
Merged

timtreis merged 1 commit into
mainfrom
ci/pypi-release

Conversation

@timtreis

Copy link
Copy Markdown
Member

Summary: Adds PyPI publishing for code releases. Publishing a GitHub release whose tag is v* (pre-releases such as v0.2.0rc1 included) builds the package with uv build and uploads it to PyPI by trusted publishing. Data releases (catalog-*, primers-*, tech-primers-*) never publish.

Changes:

  • .github/workflows/release.yaml: the scverse cookiecutter workflow (scverse/cookiecutter-scverse@f46993f), with fetch-depth: 0, environment pypi and the same pinned actions.
    • The guard if: github.event_name == 'release' && startsWith(github.event.release.tag_name, 'v') keeps catalog releases from publishing.
    • A second job uploads to TestPyPI (environment testpypi). It runs only from "Run workflow" on a v* tag, as a dry run before the first PyPI release.
  • .github/RELEASING.md: a short checklist.
    1. Check that SUPPORTED_CATALOG_SCHEMA covers the newest catalog's catalog_schema_version (both are 3 today).
    2. Write behaviour changes at the top of the generated notes, e.g. feat: keep only in-tissue rows by default in to_anndata and materialize #85.
    3. Do the one-time TestPyPI dry run.
    4. Release as a pre-release, not Latest.
    5. Bump the pins afterwards.
  • There's no CHANGELOG; the release notes stay GitHub's generated notes.

Before the first release: the pending trusted publishers for spatialdata-db have to exist on PyPI (environment pypi) and TestPyPI (environment testpypi). The name is free on both today.

Tests: in a clone of main with the tags v0.2.0rc1 and catalog-2099-01-01, uv build produced spatialdata_db-0.2.0rc1.tar.gz and -py3-none-any.whl, so hatch-vcs takes the version from the v* tag only.

@timtreis
timtreis merged commit 035bff6 into main Nov 19, 2026
5 of 6 checks passed
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.81%. Comparing base (9fc183d) to head (9b47776).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #90   +/-   ##
=======================================
  Coverage   92.81%   92.81%           
=======================================
  Files          32       32           
  Lines        4357     4357           
=======================================
  Hits         4044     4044           
  Misses        313      313           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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