Skip to content

Commit

Permalink
wheel-build: don't overwrite artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jakevdp committed Sep 13, 2024
1 parent f802a63 commit 9ebd435
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:

- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # ratchet: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
overwrite: true

build_sdist:
name: Build source distribution
Expand All @@ -74,8 +74,24 @@ jobs:

- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # ratchet: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
overwrite: true

download_and_list_artifacts:
# Helps debug issues like https://github.com/jax-ml/ml_dtypes/issues/196
name: Download and list artifacts
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # ratchet:actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- name: List files
run: ls -l dist/

upload_pypi:
name: Release & Upload to PyPI
Expand All @@ -86,10 +102,13 @@ jobs:
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # ratchet:actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- name: List files
run: ls -l dist/

- uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # ratchet:pypa/gh-action-pypi-publish@v1.9
with:
Expand Down

0 comments on commit 9ebd435

Please sign in to comment.