ci: only upload if credentials present

This commit is contained in:
Michael Davidsaver
2023-09-23 07:50:18 -07:00
parent 0b0dfde5c9
commit 9732281371
+3 -3
View File
@@ -169,14 +169,14 @@ jobs:
run: python -m twine check dist/pvxslibs-*.tar.*
- name: Upload wheels
if: github.event_name=='push' && github.ref=='refs/heads/master' && matrix.piparch
if: env.TWINE_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master' && matrix.piparch
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: python -m twine upload --skip-existing dist/pvxslibs-*.whl
- name: Upload source
if: github.event_name=='push' && github.ref=='refs/heads/master' && matrix.source
if: env.TWINE_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master' && matrix.source
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
@@ -373,7 +373,7 @@ jobs:
! ls junk/*/*/purelib
- name: Upload wheels
if: github.event_name=='push' && github.ref=='refs/heads/master'
if: env.TWINE_USERNAME && github.event_name=='push' && github.ref=='refs/heads/master'
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}