Python release workflow - #1822
Open
spacebear21 wants to merge 5 commits into
Open
Conversation
This was referenced Aug 18, 2026
Collaborator
Coverage Report for CI Build 32275589660Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 86.718%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
spacebear21
force-pushed
the
python-release-workflow
branch
2 times, most recently
from
August 19, 2026 16:15
d4ab07a to
7d8b2e8
Compare
The two per-target cargo builds run in the background and were reaped with a bare `wait`, which always returns zero no matter how the children exited. Under `set -e` a failed build therefore fell through to lipo, which would reuse a stale library from an earlier build if one was present. Wait on each build's PID so either failure stops the script.
The script hardcoded --profile dev and --features _test-utils, each annotated with a reminder that a real release must not ship the test utils feature. Adopt the PAYJOIN_FFI_FEATURES / PAYJOIN_FFI_PROFILE convention the C# generate_bindings.sh already uses: features default to _test-utils and the profile to dev, so tests behave exactly as before, while a release build sets PAYJOIN_FFI_FEATURES= and PAYJOIN_FFI_PROFILE=release to get an optimized library with no test-only APIs.
contrib/build-wheel.sh builds the production wheel into dist/ from the maintained recent lockfile, mirroring how contrib/test.sh drives the test build: release profile, no _test-utils, then uv build. contrib/test.sh now clears dist/ before building its wheel: the release wheel carries different tags than the test build, so a leftover copy would otherwise sit beside the fresh wheel and break the install step's glob.
Add the tag-gated publishing path to the Python workflow, mirroring the NuGet flow in csharp.yml: every run builds the release wheels (manylinux x86_64 and macOS universal2) and smoke-installs them on Linux, arm64 macOS, and Intel macOS with a CPython other than the one they were built with, proving the py3-none retag. Pushing a payjoin-python-<version> tag reruns the graph at the tagged commit, then publishes the smoke-tested wheels to PyPI and attaches them to the GitHub release.
The wheel advertised build, setuptools, wheel, semantic-version, and typing-extensions as exact-pinned runtime requirements, though the package imports none of them: the generated bindings use only the standard library and http.py needs httpx.
spacebear21
force-pushed
the
python-release-workflow
branch
from
August 19, 2026 16:22
7d8b2e8 to
040f2cf
Compare
spacebear21
marked this pull request as ready for review
August 19, 2026 16:25
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.
Builds on top of #1819
Add trusted publishing release workflow for Python bindings.
Co-authored by Claude Fable 5
Pull Request Checklist
Please confirm the following before requesting review:
AI
in the body of this PR.