Skip to content

Commit

Permalink
CI: Add unique artificat names to upload/download action
Browse files Browse the repository at this point in the history
v4+ requires unique artifact names, so add a qualifier including
the matrix name to the artifact. Then download all the cibw-*
artifacts and merge them into a common directory for upload to PyPI.
  • Loading branch information
greglucas committed Mar 10, 2024
1 parent db9a3fa commit fde0380
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Upload sdist result
uses: actions/upload-artifact@v4
with:
name: sdist
name: cibw-sdist
path: dist/*.tar.gz
if-no-files-found: error

Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Download sdist
uses: actions/download-artifact@v4
with:
name: sdist
name: cibw-sdist
path: dist

- uses: pypa/cibuildwheel@ce3fb7832089eb3e723a0a99cab7f3eaccf074fd # v2.16.5
Expand All @@ -120,6 +120,7 @@ jobs:

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.only }}
path: ./wheelhouse/*.whl

publish:
Expand All @@ -138,14 +139,9 @@ jobs:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- name: Download sdist
uses: actions/download-artifact@v4
with:
name: sdist
pattern: cibw-*
path: dist
merge-multiple: true

- name: Publish Package
uses: pypa/[email protected]

0 comments on commit fde0380

Please sign in to comment.