From 3166260f1a0eaffa9e08e5eea251a7b9672d776b Mon Sep 17 00:00:00 2001 From: spacebear Date: Wed, 11 Nov 2026 18:48:47 +0000 Subject: [PATCH 1/2] Cut the bindings GitHub release from the build The github-release job needed all four registry publish jobs, so a single registry failure skipped it. Every bindings release so far (0.25.0, 0.25.1 and 0.26.0) shipped without a GitHub release because the PyPI publish fails: PyPI has no trusted publisher for this workflow and cannot have one until the project owns the `payjoin` package there. npm, NuGet and pub.dev succeeded each time. The GitHub release is a provenance and verification record, not a distribution channel. Every published package bundles its own native libraries or wasm, nothing downloads from the release, and all of its assets come from the build jobs' artifacts rather than from the publish jobs. Waiting on the registries only withholds that record when one of them fails. Make github-release need the same build gate as the publish jobs, plus verify-tag for its version and prerelease outputs. The release is now cut once every language build and smoke test passes, alongside the publishes and regardless of their outcome, and re-running a failed publish job leaves it alone. A failed or skipped build still skips the release. Update the workflow header and RELEASING.md to match. --- .github/workflows/bindings-release.yml | 18 +++++++----------- payjoin-ffi/RELEASING.md | 16 ++++++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/bindings-release.yml b/.github/workflows/bindings-release.yml index 02d2a3177..f25192614 100644 --- a/.github/workflows/bindings-release.yml +++ b/.github/workflows/bindings-release.yml @@ -4,13 +4,16 @@ name: Release language bindings # shared binding version, builds the native libraries once, runs every # language's build, package and smoke checks at that commit, then # publishes Python, JavaScript, C#, and Dart through the `release` -# environment (required reviewer) with keyless OIDC and cuts one GitHub -# release holding every package and native library. +# environment (required reviewer) with keyless OIDC. Alongside the +# publishes, it cuts one GitHub release holding every package and native +# library from the same tested build, independent of the registries' +# outcome. # # Each registry has its own publish job. All four wait on every language # build, so they reach the environment gate together and one approval # releases them all; a registry failure is retried with "Re-run failed -# jobs" on the same run, reusing the tested artifacts. +# jobs" on the same run, reusing the tested artifacts and leaving the +# GitHub release alone. on: push: @@ -253,14 +256,7 @@ jobs: github-release: name: Create GitHub release - needs: - [ - verify-tag, - publish-python, - publish-javascript, - publish-csharp, - publish-dart, - ] + needs: [verify-tag, python, javascript, csharp, dart, kotlin, native] runs-on: ubuntu-26.04 permissions: contents: write # create the Release for this tag and upload assets diff --git a/payjoin-ffi/RELEASING.md b/payjoin-ffi/RELEASING.md index fc886b075..188b92d37 100644 --- a/payjoin-ffi/RELEASING.md +++ b/payjoin-ffi/RELEASING.md @@ -89,11 +89,14 @@ environment, and allow `payjoin-ffi-*` in the repository's tag rules. tests every language, then pauses four publish jobs on the `release` environment. Approve the pending deployment once; it covers all four jobs. Each registry is published with OIDC from the tested artifacts. -5. The run attaches the wheels, npm tarball, NuGet package, staged Dart - package, every native library as `payjoin_ffi--.`, - and one `SHA256SUMS` covering them all to the GitHub release. The - wheels, the NuGet package and the Dart package carry those same native - libraries, byte for byte. Verify an install from each registry and +5. Once the builds pass, without waiting for the approval or the + registries, the run creates the GitHub release from the tested + artifacts. It attaches the wheels, npm tarball, NuGet package, staged + Dart package, every native library as + `payjoin_ffi--.`, and one `SHA256SUMS` covering + them all. The wheels, the NuGet package and the Dart package carry + those same native libraries, byte for byte. Verify an install from + each registry and check provenance with `gh attestation verify FILE -R payjoin/rust-payjoin`. Optionally sign `SHA256SUMS` locally and upload `SHA256SUMS.asc`; no signing key reaches a runner. @@ -102,7 +105,8 @@ environment, and allow `payjoin-ffi-*` in the repository's tag rules. Each registry has its own job, so use **Re-run failed jobs** on the same run and approve the environment again. The re-run publishes from the same -tested artifacts and leaves the registries that already succeeded alone. +tested artifacts and leaves the GitHub release and the registries that +already succeeded alone. Never move a published tag or replace a published package; fix forward with a new version. From d5a29df1dff0cba8234930ba3d80761481de9939 Mon Sep 17 00:00:00 2001 From: spacebear Date: Wed, 11 Nov 2026 18:50:55 +0000 Subject: [PATCH 2/2] Skip the PyPI publish of the bindings for now The publish-python job fails at the PyPI upload with `invalid-publisher`: the project does not yet own the `payjoin` package on PyPI, so no trusted publisher can be configured for this workflow. Disable only the upload step with `if: false` until ownership is resolved. The job still downloads the wheels, checks both are present and attests their build provenance, and it stays behind the `release` environment gate with the other publish jobs. The wheels still reach the GitHub release. Update the workflow header and RELEASING.md where they claimed Python is published to PyPI. Re-enabling the PyPI publish is a revert of this commit. --- .github/workflows/bindings-release.yml | 11 ++++++----- payjoin-ffi/RELEASING.md | 16 ++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/bindings-release.yml b/.github/workflows/bindings-release.yml index f25192614..59c460144 100644 --- a/.github/workflows/bindings-release.yml +++ b/.github/workflows/bindings-release.yml @@ -3,11 +3,11 @@ name: Release language bindings # Pushing a signed `payjoin-ffi-` tag verifies the tag and the # shared binding version, builds the native libraries once, runs every # language's build, package and smoke checks at that commit, then -# publishes Python, JavaScript, C#, and Dart through the `release` -# environment (required reviewer) with keyless OIDC. Alongside the -# publishes, it cuts one GitHub release holding every package and native -# library from the same tested build, independent of the registries' -# outcome. +# attests the Python wheels and publishes JavaScript, C#, and Dart +# through the `release` environment (required reviewer) with keyless +# OIDC. Alongside the publishes, it cuts one GitHub release holding +# every package and native library from the same tested build, +# independent of the registries' outcome. # # Each registry has its own publish job. All four wait on every language # build, so they reach the environment gate together and one approval @@ -122,6 +122,7 @@ jobs: with: subject-path: dist/*.whl - name: Publish to PyPI + if: false uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3 with: packages-dir: dist diff --git a/payjoin-ffi/RELEASING.md b/payjoin-ffi/RELEASING.md index 188b92d37..e8cf861c6 100644 --- a/payjoin-ffi/RELEASING.md +++ b/payjoin-ffi/RELEASING.md @@ -88,7 +88,8 @@ environment, and allow `payjoin-ffi-*` in the repository's tag rules. 4. The `Release language bindings` run verifies the tag, builds and smoke tests every language, then pauses four publish jobs on the `release` environment. Approve the pending deployment once; it covers all four - jobs. Each registry is published with OIDC from the tested artifacts. + jobs. Each registry except PyPI is published with OIDC from the + tested artifacts. 5. Once the builds pass, without waiting for the approval or the registries, the run creates the GitHub release from the tested artifacts. It attaches the wheels, npm tarball, NuGet package, staged @@ -96,18 +97,17 @@ environment, and allow `payjoin-ffi-*` in the repository's tag rules. `payjoin_ffi--.`, and one `SHA256SUMS` covering them all. The wheels, the NuGet package and the Dart package carry those same native libraries, byte for byte. Verify an install from - each registry and - check provenance with `gh attestation verify FILE -R payjoin/rust-payjoin`. - Optionally sign `SHA256SUMS` locally and upload `SHA256SUMS.asc`; no - signing key reaches a runner. + npm, NuGet and pub.dev and check provenance with + `gh attestation verify FILE -R payjoin/rust-payjoin`. Optionally sign + `SHA256SUMS` locally and upload `SHA256SUMS.asc`; no signing key + reaches a runner. ## If a publish job fails Each registry has its own job, so use **Re-run failed jobs** on the same run and approve the environment again. The re-run publishes from the same tested artifacts and leaves the GitHub release and the registries that -already succeeded alone. -Never move a published tag or replace a published package; fix forward -with a new version. +already succeeded alone. Never move a published tag or replace a +published package; fix forward with a new version. [automated publishing]: https://dart.dev/tools/pub/automated-publishing