From c330e3acac62d120bd4d4f009a22acf04954af39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= <130084892+marco-2023@users.noreply.github.com> Date: Fri, 7 Feb 2025 17:18:25 -0500 Subject: [PATCH] Add publish to pypi step (#100) --- .github/workflows/build_wheels.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 0286b56..938a9eb 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -162,10 +162,22 @@ jobs: echo "Contents of wheelhouse:" ls -l wheelhouse/ - - name: Upload to TestPyPI + - name: Upload to PyPI env: TWINE_USERNAME: "__token__" TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + if [ "$(ls -A wheelhouse)" ]; then + python -m pip install --upgrade twine + python -m twine upload --repository-url https://upload.pypi.org/legacy/ wheelhouse/* + else + echo "No wheel files to upload" + fi + + - name: Upload to TestPyPI + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }} run: | if [ "$(ls -A wheelhouse)" ]; then python -m pip install --upgrade twine