From a01a37e234695065adef927883a08b2f6c364134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Mon, 6 Oct 2025 22:51:07 -0400 Subject: [PATCH] Add fixes to publishing workflow --- .github/workflows/publish_pypi.yml | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 3a1c679..48846b0 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -72,24 +72,32 @@ jobs: - publish: - name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags/v') - needs: [build_wheels] + publish-to-pypi: + name: Publish Python distribution to PyPI + # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/') + needs: + - build_wheels runs-on: ubuntu-latest + environment: + name: pypi-release + url: https://pypi.org/project/${{ env.PYPI_NAME }} permissions: id-token: write steps: - - name: Download all built wheels + - name: Download all the dists uses: actions/download-artifact@v4 with: - path: dist + path: dist/ + merge-multiple: true # Merge all artifacts into the dist/ directory - - name: Publish to PyPI + - name: Check dist contents + run: | + echo "Contents of dist:" + ls -l dist/ + + - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - packages-dir: dist - env: - TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + verbose: true