ci: add release workflow for PyPI publish via Trusted Publishers#9
Merged
ci: add release workflow for PyPI publish via Trusted Publishers#9
Conversation
Adds .github/workflows/release.yml that builds the memtomem distribution and publishes it to PyPI (or TestPyPI for dry-runs) via OIDC. No API tokens are stored in the repo — pypa/gh-action-pypi-publish picks up the short-lived OIDC token from GitHub at run time and PyPI verifies it against the pre-registered Trusted Publisher entry. Tag conventions: v0.1.0 → PyPI (production) test-v0.1.0a1 → TestPyPI (dry run) Both code paths run inside the `pypi` GitHub environment, which is gated to tag pushes matching `v*` only. Required reviewers on that environment provide the manual approval gate before each publish. The build job runs `uv build` from packages/memtomem and uploads the sdist+wheel as a job artifact; the publish job downloads the artifact and dispatches it to the chosen index based on the tag prefix. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds `.github/workflows/release.yml` that builds memtomem and publishes it to PyPI (or TestPyPI for dry-runs) via PyPI Trusted Publishers (OIDC). No API tokens are stored in the repo.
Tag conventions
Both run inside the `pypi` GitHub environment, gated to `v*` tags only with required reviewer approval.
Workflow
Verification (after merge)
Companion PR
Pairs with memtomem/memtomem-stm release.yml PR. Core publishes first (it's a runtime dependency of memtomem-stm).
🤖 Generated with Claude Code