From 458c54914c7dbd4ff27cbc60ee25926e99281aa2 Mon Sep 17 00:00:00 2001 From: Filippo Luca Ferretti <102977828+flferretti@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:52:04 +0100 Subject: [PATCH] Fix PyPI deployment on CI --- .github/workflows/pypi-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pypi-ci.yml b/.github/workflows/pypi-ci.yml index af5f314d..620d0494 100644 --- a/.github/workflows/pypi-ci.yml +++ b/.github/workflows/pypi-ci.yml @@ -44,9 +44,9 @@ jobs: deploy_test_PyPI: name: 📦 Deploy to TestPyPI runs-on: ubuntu-22.04 + if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/') permissions: - id-token: write - + id-token: write steps: - name: Download artifacts uses: actions/download-artifact@v4 @@ -63,8 +63,9 @@ jobs: deploy_PyPI: name: 📦 Deploy to PyPI runs-on: ubuntu-22.04 + if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/') permissions: - id-token: write + id-token: write steps: - name: Download artifacts