From 9732281371def2ddae05da9b923eff21a12fa4a2 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Sat, 23 Sep 2023 07:50:18 -0700 Subject: [PATCH] ci: only upload if credentials present --- .github/workflows/python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 2c371b2..5afc01a 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -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 }}