diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index dae17f2..911d9cb 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -39,8 +39,9 @@ jobs: if-no-files-found: error publish-test: name: Publish to Test PyPI + if: github.event_name == 'push' + needs: [build] runs-on: ubuntu-latest - needs: build steps: - name: Download dist files uses: actions/download-artifact@v2 @@ -50,14 +51,14 @@ jobs: - name: Publish package to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: + repository_url: https://test.pypi.org/legacy/ user: __token__ password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ publish: name: Publish to PyPI + if: github.event_name == 'release' + needs: [build] runs-on: ubuntu-latest - needs: [build, publish-test] - if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Download dist files uses: actions/download-artifact@v2