From 204129df23ddc4a0debe7cc6a57b8807dffc9db1 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 22 Oct 2026 22:29:50 +1100 Subject: [PATCH] Only upload SBOM after release is created --- .github/workflows/wheels.yml | 39 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2a9e26a41a6..237b45ed3cd 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -347,27 +347,6 @@ jobs: artifacts_path: dist anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} - sbom-publish: - if: | - github.event.repository.fork == false - && github.event_name == 'push' - && startsWith(github.ref, 'refs/tags') - needs: [count-dists, sbom] - runs-on: ubuntu-latest - name: Publish SBOM to GitHub release - permissions: - contents: write - steps: - - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 - with: - name: sbom - path: . - - - name: Attach SBOM to GitHub release - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release upload "$GITHUB_REF_NAME" pillow-*.cdx.json --repo "$GITHUB_REPOSITORY" - pypi-publish: if: github.event.repository.fork == false && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') needs: count-dists @@ -388,3 +367,21 @@ jobs: uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 with: attestations: true + + sbom-publish: + if: github.event.repository.fork == false && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + needs: [count-dists, pypi-publish, sbom] + runs-on: ubuntu-latest + name: Publish SBOM to GitHub release + permissions: + contents: write + steps: + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: sbom + path: . + + - name: Attach SBOM to GitHub release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload "$GITHUB_REF_NAME" pillow-*.cdx.json --repo "$GITHUB_REPOSITORY"