From c81a132d19f6cdaf177733d2793521f02bbd9037 Mon Sep 17 00:00:00 2001 From: Joani Mato Date: Tue, 25 Feb 2025 15:43:38 -0800 Subject: [PATCH 1/2] fixed pypi download artifact bug, v1 --- .github/workflows/pypi-build.yml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pypi-build.yml b/.github/workflows/pypi-build.yml index 6c2c71d..275945a 100644 --- a/.github/workflows/pypi-build.yml +++ b/.github/workflows/pypi-build.yml @@ -5,6 +5,7 @@ on: branches: - master - develop + - pypi-test paths-ignore: - 'example/**' - 'docs/**' @@ -144,7 +145,7 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' + # if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Checkout @@ -157,14 +158,23 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip setuptools twine - - name: Download artifacts + - name: Download wheel artifacts uses: actions/download-artifact@v4 with: - name: dist + name: wheels path: ./dist - - name: Publish sdist and wheel to PyPI - run: | - twine upload dist/* - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_FORLILAB }} + - name: Download sdist artifacts + uses: actions/download-artifact@v4 + with: + name: sdist + path: ./dist + - name: Verify dist directory + run: ls -lah dist + - name: Check packages before upload + run: twine check dist/* + # - name: Publish sdist and wheel to PyPI + # run: | + # twine upload dist/* + # env: + # TWINE_USERNAME: __token__ + # TWINE_PASSWORD: ${{ secrets.PYPI_FORLILAB }} From a593b6d1ede31504e47487a959279dc8ad585897 Mon Sep 17 00:00:00 2001 From: Joani Mato Date: Tue, 25 Feb 2025 17:21:31 -0800 Subject: [PATCH 2/2] finaled changes, removed debug. --- .github/workflows/pypi-build.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pypi-build.yml b/.github/workflows/pypi-build.yml index 275945a..e96fdc2 100644 --- a/.github/workflows/pypi-build.yml +++ b/.github/workflows/pypi-build.yml @@ -5,7 +5,6 @@ on: branches: - master - develop - - pypi-test paths-ignore: - 'example/**' - 'docs/**' @@ -106,7 +105,6 @@ jobs: rm -rf boost_1_* rm -rf swig-4* - name: Upload artifacts for inspection - if: ${{ env.ACT }} != 'true' # Skip this step if running locally using 'act' uses: actions/upload-artifact@v4 with: name: wheels @@ -145,7 +143,7 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # if: github.event_name == 'release' && github.event.action == 'published' + if: github.event_name == 'release' && github.event.action == 'published' steps: - name: Checkout @@ -172,9 +170,9 @@ jobs: run: ls -lah dist - name: Check packages before upload run: twine check dist/* - # - name: Publish sdist and wheel to PyPI - # run: | - # twine upload dist/* - # env: - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_FORLILAB }} + - name: Publish sdist and wheel to PyPI + run: | + twine upload dist/* + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_FORLILAB }}