Skip to content

Commit 8dc8a40

Browse files
committed
Fix build matrix and PyPI upload (#30)
* Fix artefact upload names * Set build requirement numpy<2 for python < 3.9
1 parent 0bc5722 commit 8dc8a40

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/upload_to_pypi.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ jobs:
2525
# available yet which can cause the build to fail. Keep going, and upload
2626
# the wheels for all of the previous versions when that happens.
2727
continue-on-error: true
28-
uses: pypa/cibuildwheel@v2.20.0
28+
uses: pypa/cibuildwheel@v2.22.0
2929

3030
- uses: actions/upload-artifact@v4
3131
with:
32+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
3233
path: ./wheelhouse/*.whl
3334

3435
build_sdist:
@@ -50,19 +51,21 @@ jobs:
5051

5152
- uses: actions/upload-artifact@v4
5253
with:
54+
name: cibw-sdist
5355
path: dist/*.tar.gz
5456

5557
upload_pypi:
5658
name: Upload to PyPI
5759
needs: [build_wheels, build_sdist]
5860
runs-on: ubuntu-latest
61+
permissions:
62+
id-token: write
63+
if: startsWith(github.ref, 'refs/tags/v')
5964
steps:
6065
- uses: actions/download-artifact@v4
6166
with:
62-
name: artifact
63-
path: dist
67+
pattern: cibw-*
68+
path: dist
69+
merge-multiple: true
6470

6571
- uses: pypa/gh-action-pypi-publish@release/v1
66-
with:
67-
user: __token__
68-
password: ${{ secrets.PYPI_API_TOKEN }}

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = [
33
"wheel",
44
"setuptools",
55
"Cython>=0.29.2",
6-
"oldest-supported-numpy; python_version<'3.9'",
6+
"numpy<2; python_version<'3.9'",
77
"numpy>=2; python_version>='3.9'",
88
]
99
build-backend = 'setuptools.build_meta'

0 commit comments

Comments
 (0)