From 7c365d7c84bfdde4c9647bc8f3ff14339c3787f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Fri, 7 Feb 2025 21:18:15 -0500 Subject: [PATCH 1/2] New try publish to pypi --- .github/workflows/build_wheels.yml | 69 ++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 938a9eb..98c0cb4 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -162,26 +162,57 @@ jobs: echo "Contents of wheelhouse:" ls -l wheelhouse/ - - name: Upload to PyPI + - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 + with: + path: ./wheelhouse/*.whl + name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} + ${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }} + ${{ matrix.buildplat[4] }} + + 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 the dists + uses: actions/download-artifact@v4 + with: + path: dist/ + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 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 - python -m twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/* - else - echo "No wheel files to upload" - fi + # - 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 + # python -m twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/* + # else + # echo "No wheel files to upload" + # fi From 7c3d6aba5c29e5244f54c80a9c039902a15a2b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Fri, 7 Feb 2025 21:32:58 -0500 Subject: [PATCH 2/2] Continue with new tests --- .github/workflows/build_wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 98c0cb4..f6acb7c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -177,7 +177,7 @@ jobs: - build_wheels runs-on: ubuntu-latest environment: - name: PyPI-Release + name: pypi-release url: https://pypi.org/project/${{ env.PYPI_NAME }} permissions: id-token: write