diff --git a/.github/workflows/schemacode_ci.yml b/.github/workflows/schemacode_ci.yml index 1515459d5b..945a16cf39 100644 --- a/.github/workflows/schemacode_ci.yml +++ b/.github/workflows/schemacode_ci.yml @@ -107,7 +107,6 @@ jobs: runs-on: ${{ matrix.os }} name: Publish Python Package needs: [test] - if: github.event_name == 'push' strategy: matrix: os: ["ubuntu-latest"] @@ -120,13 +119,14 @@ jobs: path: dist/ - name: "Test PyPI upload" uses: pypa/gh-action-pypi-publish@release/v1 + if: github.event_name == 'push' with: user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository-url: https://test.pypi.org/legacy/ skip-existing: true - name: "Upload to PyPI (on tags)" - if: startsWith(github.ref, 'refs/tags/schema-') + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/schema-') uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__