1111 - published
1212
1313jobs :
14- build :
15- name : Build
14+ build-sdist :
15+ name : Build source distribution
1616 runs-on : ubuntu-latest
1717 steps :
1818 - uses : actions/checkout@v4
1919 - name : Build sdist
2020 run : pipx run build --sdist
21+ - uses : actions/upload-artifact@v4
22+ with :
23+ if-no-files-found : error
24+ compression-level : 0
25+ name : cibw-sdist
26+ path : dist/*.tar.gz
27+
28+ build-wheels :
29+ name : Build wheels on ${{ matrix.os }}
30+ runs-on : ${{ matrix.os }}
31+ strategy :
32+ matrix :
33+ os : [ubuntu-24.04, ubuntu-24.04-arm]
34+ steps :
35+ - uses : actions/checkout@v4
2136 - name : Build wheels
2237 uses : pypa/cibuildwheel@v2.22.0
23- - name : Prepare for artifact upload
24- run : |
25- mkdir out
26- mv -t out dist/*.tar.gz
27- mv -t out wheelhouse/*.whl
2838 - uses : actions/upload-artifact@v4
2939 with :
3040 if-no-files-found : error
3141 compression-level : 0
32- path : out/
42+ name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
43+ path : ./wheelhouse/*.whl
3344
3445 test-pypi-publish :
3546 name : Upload release to TestPyPI
36- needs : [build]
47+ needs : [build-sdist, build-wheels ]
3748 runs-on : ubuntu-latest
3849 environment : test-pypi
3950 permissions :
@@ -42,16 +53,17 @@ jobs:
4253 steps :
4354 - uses : actions/download-artifact@v4
4455 with :
45- name : artifact
56+ pattern : cibw-*
4657 path : dist
58+ merge-multiple : true
4759 - name : Publish package distributions to PyPI
4860 uses : pypa/gh-action-pypi-publish@release/v1
4961 with :
5062 repository-url : https://test.pypi.org/legacy/
5163
5264 pypi-publish :
5365 name : Upload release to PyPI
54- needs : [build, test-pypi-publish]
66+ needs : [build-sdist, build-wheels , test-pypi-publish]
5567 runs-on : ubuntu-latest
5668 environment : pypi
5769 permissions :
6072 steps :
6173 - uses : actions/download-artifact@v4
6274 with :
63- name : artifact
75+ pattern : cibw-*
6476 path : dist
77+ merge-multiple : true
6578 - name : Publish package distributions to PyPI
6679 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments