From 7776cfbf469dbe88edbc2b9a8abc1b32b382f916 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 27 Jun 2026 15:46:41 -0400 Subject: [PATCH] fall back to twine upload without attestations if attestation signing fails On some platforms (e.g. windows-11-arm) pypi-attestations cannot install due to missing cryptography binary wheels. Use continue-on-error on the attestation step and conditionally pass --attestations to twine only when signing succeeded. Change-Id: Ibc9b5091c0db361f24376a887d6db04b0e32503c --- .github/workflows/create-wheels.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create-wheels.yaml b/.github/workflows/create-wheels.yaml index 708dab5097..a0ff4ed0e1 100644 --- a/.github/workflows/create-wheels.yaml +++ b/.github/workflows/create-wheels.yaml @@ -128,11 +128,18 @@ jobs: files: './wheelhouse/*.whl' - name: Generate attestations + id: attestations + continue-on-error: true run: | pip install pypi-attestations python -m pypi_attestations sign ./wheelhouse/* - name: Publish wheel + shell: bash run: | pip install "twine>=6.2.0" - twine upload --skip-existing --attestations ./wheelhouse/* + if [[ "${{ steps.attestations.outcome }}" == "success" ]]; then + twine upload --skip-existing --attestations ./wheelhouse/* + else + twine upload --skip-existing ./wheelhouse/* + fi -- 2.47.3