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
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