11name : Publish to PyPI
22
3- on :
4- push :
5- branches :
6- - main
3+ on : [push]
74
85jobs :
96 build :
107 runs-on : ${{ matrix.os }}
118 strategy :
129 matrix :
13- os : [ubuntu-latest, windows-latest, macos-latest ]
10+ os : [ubuntu-latest]
1411
1512 steps :
1613 - uses : actions/checkout@v4
1714
1815 - uses : actions/setup-python@v5
16+ with :
17+ python-version : 3.11
1918
2019 - name : Install build tools
2120 run : python -m pip install cibuildwheel
2221
2322 - name : Build wheel with cibuildwheel
2423 env :
2524 CIBW_BUILD : " cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
25+ CIBW_IGNORE : " *-linux_x86_64"
2626 CIBW_BEFORE_BUILD : pip install cffi
2727 run : python -m cibuildwheel --output-dir wheelhouse
2828
@@ -39,12 +39,14 @@ jobs:
3939 - uses : actions/checkout@v4
4040
4141 - uses : actions/setup-python@v5
42+ with :
43+ python-version : 3.11
4244
4345 - name : Install build tools
44- run : pip install build twine wheel cython
46+ run : pip install build wheel cython
4547
4648 - name : Compile and Build package
47- run : python setup.py sdist bdist_wheel
49+ run : python -m build --sdist
4850
4951 - name : Upload dist
5052 uses : actions/upload-artifact@v4
@@ -59,29 +61,25 @@ jobs:
5961 runs-on : ubuntu-latest
6062
6163 steps :
62- - name : Download wheels
63- uses : actions/download-artifact@v4
64- with :
65- name : wheels-ubuntu-latest
64+ - uses : actions/checkout@v4
6665
67- - name : Download wheels
68- uses : actions/download-artifact@v4
66+ - uses : actions/setup-python@v5
6967 with :
70- name : wheels-windows-latest
68+ python-version : 3.11
7169
72- - name : Download wheels
73- uses : actions/download-artifact@v4
74- with :
75- name : wheels-macos-latest
70+ - name : Install build tools
71+ run : |
72+ pip install build twine wheel cython
73+ pip install -U packaging
7674
77- - name : Download dist
75+ - name : Download wheels
7876 uses : actions/download-artifact@v4
7977 with :
80- name : dist
78+ name : wheels-ubuntu-latest
8179
8280 - name : Compile and Build package
8381 run : |
8482 mkdir -p dist
85- for f in *; do
86- [ "$f" != "dist" ] && mv "$f" dist/
87- done
83+ mv ./*.{tar.gz,whl} dist || true
84+
85+ ls -la dist
0 commit comments