From b8a629e3654e2d564998f1efe84459cfe73ecc5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20L=C3=B6ffler?= Date: Fri, 19 Apr 2024 22:38:02 +0300 Subject: [PATCH] Improve publishing to pypi --- .github/workflows/pypi-release.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pypi-release.yaml b/.github/workflows/pypi-release.yaml index 1c26381..9cfb3c5 100644 --- a/.github/workflows/pypi-release.yaml +++ b/.github/workflows/pypi-release.yaml @@ -33,7 +33,7 @@ jobs: run: | python -m twine check --strict dist/* pwd - if [ -f dist/numpy-groupies-0.0.0.tar.gz ]; then + if [ -f dist/numpy_groupies-0.0.0.tar.gz ]; then echo "❌ INVALID VERSION NUMBER" exit 1 else @@ -64,16 +64,14 @@ jobs: if: github.event_name == 'push' run: | python -m pip install --upgrade pip - python -m pip install dist/numpy-groupies*.tar.gz + python -m pip install dist/*.tar.gz - name: Publish package to TestPyPI if: github.event_name == 'push' uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ password: ${{ secrets.TESTPYPI_TOKEN }} repository-url: https://test.pypi.org/legacy/ - verbose: true - + skip-existing: true upload-to-pypi: needs: test-built-dist @@ -87,6 +85,5 @@ jobs: - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ password: ${{ secrets.PYPI_TOKEN }} - verbose: true + skip-existing: true