Skip to content

Commit

Permalink
Fix publish job in CI (#15)
Browse files Browse the repository at this point in the history
* Fix publish job in CI

* Fix for upload-artifact@v4 and download-artifact@v4
  • Loading branch information
adrien-berchet committed Jan 29, 2024
1 parent 327377c commit dd63de2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -53,6 +53,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: wheelhouse_sdist
path: wheelhouse/*.tar.gz
retention-days: 1

Expand All @@ -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 }}
Expand Down

0 comments on commit dd63de2

Please sign in to comment.