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
@@ -39,12 +38,14 @@ jobs:
3938 - uses : actions/checkout@v4
4039
4140 - uses : actions/setup-python@v5
41+ with :
42+ python-version : 3.11
4243
4344 - name : Install build tools
44- run : pip install build twine wheel cython
45+ run : pip install build cython
4546
4647 - name : Compile and Build package
47- run : python setup.py sdist bdist_wheel
48+ run : python -m build --sdist
4849
4950 - name : Upload dist
5051 uses : actions/upload-artifact@v4
@@ -59,29 +60,25 @@ jobs:
5960 runs-on : ubuntu-latest
6061
6162 steps :
62- - name : Download wheels
63- uses : actions/download-artifact@v4
64- with :
65- name : wheels-ubuntu-latest
63+ - uses : actions/checkout@v4
6664
67- - name : Download wheels
68- uses : actions/download-artifact@v4
65+ - uses : actions/setup-python@v5
6966 with :
70- name : wheels-windows-latest
67+ python-version : 3.11
7168
72- - name : Download wheels
73- uses : actions/download-artifact@v4
74- with :
75- name : wheels-macos-latest
69+ - name : Install build tools
70+ run : |
71+ pip install build twine wheel cython
72+ pip install -U packaging
7673
77- - name : Download dist
74+ - name : Download wheels
7875 uses : actions/download-artifact@v4
7976 with :
80- name : dist
77+ name : wheels-ubuntu-latest
8178
8279 - name : Compile and Build package
8380 run : |
8481 mkdir -p dist
85- for f in *; do
86- [ "$f" != "dist" ] && mv "$f" dist/
87- done
82+ mv ./*.{tar.gz,whl} dist || true
83+
84+ ls -la dist
0 commit comments