diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index d553065..8dbcd26 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -49,6 +49,9 @@ jobs: publish: needs: test runs-on: ubuntu-latest + if: > + github.event_name == 'push' && + startsWith(github.event.ref, 'refs/tags') steps: - uses: actions/checkout@v4 - name: Build distribution @@ -60,9 +63,6 @@ jobs: pip install .[dev,test] pyproject-build - name: Publish package - if: > - github.event_name == 'push' && - startsWith(github.event.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.5.0 with: user: __token__