diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 113ed9bb..96a7fb06 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,14 +8,14 @@ jobs: steps: - uses: actions/checkout@v2 - - if: ${{ github.event_name == 'release' }} + - if: ${{ github.event_name == 'release' && secrets.PYPI_PASSWORD != '' }} name: Publish Release to PyPi uses: dciborow/pyaction@0.0.28 with: pypi_publish: true pypi_password: ${{ secrets.PYPI_PASSWORD }} - - if: ${{ github.event_name == 'push' }} + - if: ${{ github.event_name == 'push' && secrets.PYPI_PASSWORD != '' }} name: Publish RC to PyPi uses: dciborow/pyaction@0.0.28 with: @@ -23,7 +23,7 @@ jobs: pypi_password: ${{ secrets.PYPI_PASSWORD }} version_suffix: -rc${{ github.run_number }}-post${{ github.run_attempt }} - - if: ${{ github.event_name == 'pull_request' }} + - if: ${{ github.event_name == 'pull_request' && secrets.TEST_PYPI_PASSWORD != '' }} name: Publish Snapshot to TestPyPi uses: dciborow/pyaction@0.0.28 with: