Skip to content

Commit

Permalink
Mutaully exclude test PyPi and PyPI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnittl committed Nov 2, 2021
1 parent 1253980 commit 4583d97
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 4583d97

Please sign in to comment.