From b2b0b98c027493a458e8e0aac129595c4ba43922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Fri, 7 Feb 2025 16:01:48 -0500 Subject: [PATCH 1/3] Fixes to publish to pypi --- .github/workflows/build_wheels.yml | 45 ++++++++---------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index a5cdac7..c8a2b9b 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -157,41 +157,18 @@ jobs: mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/') fi - - uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 - with: - path: wheelhouse - 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 wheels - uses: actions/download-artifact@v4 - with: - path: dist - merge-multiple: false - - - name: check wheels + - name: Check wheelhouse contents run: | - for wheel in dist/*.whl; do - head -c 4 wheelhouse/qc_PyCI-0.6.3-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | hexdump -C - done + echo "Contents of wheelhouse:" + ls -l wheelhouse/ - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Upload to TestPyPI env: TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} \ No newline at end of file + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + if [ "$(ls -A wheelhouse)" ]; then + python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* + else + echo "No wheel files to upload" + fi From d6c39e4185fe85257620f03578bff8fb465ce266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Fri, 7 Feb 2025 16:08:00 -0500 Subject: [PATCH 2/3] Fixes to publish to pypi --- .github/workflows/build_wheels.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index c8a2b9b..a03cdf9 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -168,6 +168,7 @@ jobs: TWINE_PASSWORD: ${{ secrets.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/ dist/* else echo "No wheel files to upload" From a4bd4744ad944561da29bebd5461327af2fb8a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Mart=C3=ADnez=20Gonz=C3=A1lez?= Date: Fri, 7 Feb 2025 16:13:57 -0500 Subject: [PATCH 3/3] Fixes to publish to pypi --- .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 a03cdf9..0286b56 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -169,7 +169,7 @@ jobs: run: | if [ "$(ls -A wheelhouse)" ]; then python -m pip install --upgrade twine - python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* + python -m twine upload --repository-url https://test.pypi.org/legacy/ wheelhouse/* else echo "No wheel files to upload" fi