Skip to content

Commit

Permalink
Fix github workflow to avoid repeat run of building python distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
jinningwang committed Jan 30, 2024
1 parent 8cf4c90 commit 7bae3bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Build a distribution if tagged
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.9'
run: |
python setup.py sdist
- name: Publish a Python distribution to PyPI if tagged
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.9'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down

0 comments on commit 7bae3bc

Please sign in to comment.