Repository navigation
Improve PyPI release infrastructure - #2
Merged
Merged
Conversation
Replace the deploy jobs that were bolted onto the CI workflow with a purpose-built release pipeline, and slim the CI workflow to test + lint. release.yml (new): - Verifies the git tag matches the pyproject.toml and Cargo.toml versions before anything is published. - Native Linux test gate so a broken build never reaches an index. - Broader wheel coverage: manylinux + musllinux for x86_64 and aarch64, Windows x64, macOS x86_64 + arm64 (abi3, one wheel per platform/arch). - Collects all artifacts and runs twine check (now fatal) before publishing. - Publishes to PyPI on a v* tag via trusted publishing (OIDC) with PEP 740 attestations; TestPyPI is available on demand via workflow_dispatch. - Creates a GitHub Release with notes extracted from CHANGELOG.md and the built artifacts attached. ci.yml (renamed from test_and_deploy.yml): - Test matrix (Linux/macOS/Windows x Python 3.10-3.13) plus the fmt/clippy lint job. No longer triggers on tags or carries deploy jobs. Remove test_pypi.yml; TestPyPI publishing now lives in release.yml and uses trusted publishing instead of a long-lived API token.
maturin develop requires an activated virtualenv, which the runners don't have. Build a wheel and pip-install it instead, which works uniformly on Linux/macOS/Windows without venv activation.
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
Replaces the deploy jobs that were bolted onto the CI workflow with a dedicated, more robust release pipeline, and slims CI down to testing + linting.
release.yml(new)v*tag matches thepyproject.tomlandCargo.tomlversions before publishing anything.twine check(now fatal, previously non-fatal) before any publish step.workflow_dispatchwith atargetinput, also via trusted publishing (replaces the token-basedtest_pypi.yml).CHANGELOG.mdand the built wheels/sdist attached.ci.yml(renamed fromtest_and_deploy.yml)fmt/clippylint.Removed
test_pypi.yml— folded intorelease.yml.PyPI/TestPyPI trusted publishers are configured per workflow filename. The publisher was set up for
test_and_deploy.yml; update it (on both PyPI and TestPyPI) to point atrelease.yml, and create atestpypiGitHub Environment (thepypienvironment already exists). Without this, the publish step will be rejected with an OIDC error.Test plan
needs/artifact names cross-checked.awkverified against the realCHANGELOG.md(0.1.0 section).v0.1.0tag (or a TestPyPI dry run via Actions → Release → Run workflow → testpypi).