Queue publish runs and retry PyPI upload failures (#829)

This commit is contained in:
Glenn Jocher
2026-07-24 12:45:45 +02:00
parent 617e879fb8
commit 63f6d95d08
+16
View File
@@ -13,6 +13,10 @@ on:
type: boolean
description: Publish to PyPI
concurrency:
group: ${{ github.workflow }}
queue: max
jobs:
check:
if: github.repository == 'ultralytics/actions' && github.actor == 'glenn-jocher' && github.ref == 'refs/heads/main'
@@ -100,8 +104,20 @@ jobs:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
id: publish
continue-on-error: true
with:
skip-existing: true # tolerate recovery re-runs after partial failures
- name: Clean partial attestations # leftover *.publish.attestation files make the retry fail pre-existence checks
if: steps.publish.outcome == 'failure'
run: |
rm -f dist/*.publish.attestation
sleep 30
- name: Retry publish # transient sigstore/Rekor or PyPI network failures
if: steps.publish.outcome == 'failure'
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
sbom:
needs: [check, build, publish]