@@ -12,48 +12,85 @@ jobs:
1212 os : [ubuntu-latest, windows-latest, macos-latest]
1313
1414 steps :
15- - name : Checkout code
16- uses : actions/checkout@v3
15+ - uses : actions/checkout@v4
1716
18- - name : Set up Python
19- uses : actions/setup-python@v4
20- with :
21- python-version : 3.11
17+ - uses : actions/setup-python@v5
2218
2319 - name : Install build tools
24- run : pip install build twine wheel cibuildwheel
20+ run : python -m pip install cibuildwheel
2521
2622 - name : Build wheel with cibuildwheel
2723 env :
28- CIBW_BUILD : cp37-*,cp38-*,cp39-*,cp310-*,cp311-*,cp312-*,cp313-*,cp314-*
29- run : cibuildwheel --output-dir wheelhouse
24+ CIBW_BUILD : " cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
25+ CIBW_BEFORE_BUILD : pip install cffi
26+ run : python -m cibuildwheel --output-dir wheelhouse
3027
3128 - name : Upload wheels
32- uses : actions/upload-artifact@v3
29+ uses : actions/upload-artifact@v4
3330 with :
3431 name : wheels-${{ matrix.os }}
3532 path : wheelhouse/
3633
34+ build-dist-artifacts :
35+ runs-on : ubuntu-latest
36+
37+ steps :
38+ - uses : actions/checkout@v4
39+
40+ - uses : actions/setup-python@v5
41+
42+ - name : Install build tools
43+ run : pip install build wheel cython
44+
45+ - name : Compile and Build package
46+ run : python setup.py sdist bdist_wheel
47+
48+ - name : Upload dist
49+ uses : actions/upload-artifact@v4
50+ with :
51+ name : dist
52+ path : dist/
53+
3754 publish :
38- needs : build
55+ needs :
56+ - build
57+ - build-dist-artifacts
3958 runs-on : ubuntu-latest
4059
4160 steps :
61+ - uses : actions/checkout@v4
62+
63+ - uses : actions/setup-python@v5
64+
65+ - name : Install build tools
66+ run : pip install build twine wheel cython
67+
4268 - name : Download wheels
43- uses : actions/download-artifact@v3
69+ uses : actions/download-artifact@v4
4470 with :
4571 name : wheels-ubuntu-latest
72+
4673 - name : Download wheels
47- uses : actions/download-artifact@v3
74+ uses : actions/download-artifact@v4
4875 with :
4976 name : wheels-windows-latest
77+
5078 - name : Download wheels
51- uses : actions/download-artifact@v3
79+ uses : actions/download-artifact@v4
5280 with :
5381 name : wheels-macos-latest
5482
55- - name : Combine wheels
56- run : mkdir dist && mv wheelhouse/* dist/
83+ - name : Download dist
84+ uses : actions/download-artifact@v4
85+ with :
86+ name : dist
87+
88+ - name : Compile and Build package
89+ run : |
90+ mkdir -p dist
91+ for f in *; do
92+ [ "$f" != "dist" ] && mv "$f" dist/
93+ done
5794
5895 - name : Publish to PyPI
5996 env :
0 commit comments