From dd63de2d0aef538dd70b6b649683f5b4336b4df3 Mon Sep 17 00:00:00 2001 From: Adrien Berchet Date: Mon, 29 Jan 2024 23:00:16 +0100 Subject: [PATCH] Fix publish job in CI (#15) * Fix publish job in CI * Fix for upload-artifact@v4 and download-artifact@v4 --- .github/workflows/build_and_publish.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 95e32c7..c647bdc 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -38,8 +38,8 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} - path: ./wheelhouse/*.whl + name: wheelhouse_wheel_${{ matrix.os }} + path: wheelhouse/*.whl retention-days: 1 build_sdist: @@ -53,6 +53,7 @@ jobs: - uses: actions/upload-artifact@v4 with: + name: wheelhouse_sdist path: wheelhouse/*.tar.gz retention-days: 1 @@ -63,12 +64,18 @@ jobs: # Upload to PyPI on every tag if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') steps: - - uses: actions/download-artifact@v3 + - name: Download artifacts produced during the build_wheels and build_sdist jobs + uses: actions/download-artifact@v4 with: - name: artifact + merge-multiple: true path: wheelhouse - - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Display structure of downloaded files + run: ls -R + working-directory: wheelhouse + + - name: Publish package to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }}