File tree Expand file tree Collapse file tree 1 file changed +71
-0
lines changed
Expand file tree Collapse file tree 1 file changed +71
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and upload to PyPI
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ push :
7+ branches :
8+ - master
9+ release :
10+ types :
11+ - published
12+
13+ jobs :
14+ build_wheels :
15+ name : Build wheels on ${{ matrix.os }}
16+ runs-on : ${{ matrix.os }}
17+ strategy :
18+ matrix :
19+ os : [ubuntu-22.04, windows-2022, macos-11]
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - name : Cythonize
25+ run : |
26+ pip install numpy scipy Cython
27+ sh ./cythonize.sh
28+
29+ - name : Build wheels
30+ uses : pypa/cibuildwheel@v2.16.2
31+
32+ - uses : actions/upload-artifact@v4
33+ with :
34+ name : cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
35+ path : ./wheelhouse/*.whl
36+
37+ build_sdist :
38+ name : Build source distribution
39+ runs-on : ubuntu-latest
40+ steps :
41+ - uses : actions/checkout@v4
42+
43+ - name : Cythonize
44+ run : |
45+ pip install numpy scipy Cython
46+ sh ./cythonize.sh
47+
48+ - name : Build sdist
49+ run : pipx run build --sdist
50+
51+ - uses : actions/upload-artifact@v4
52+ with :
53+ name : cibw-sdist
54+ path : dist/*.tar.gz
55+
56+ upload_pypi :
57+ needs : [build_wheels, build_sdist]
58+ runs-on : ubuntu-latest
59+ environment : pypi
60+ permissions :
61+ id-token : write
62+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
63+ steps :
64+ - uses : actions/download-artifact@v4
65+ with :
66+ # unpacks all CIBW artifacts into dist/
67+ pattern : cibw-*
68+ path : dist
69+ merge-multiple : true
70+
71+ - uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments