ci: only upload if credentials present
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user