File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : wheels
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ jobs :
9+ sdist :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+
14+ - name : Build sdist
15+ run : pipx run build --sdist
16+
17+ - uses : actions/upload-artifact@v4
18+ with :
19+ name : sdist
20+ path : dist/*.tar.gz
21+
22+ wheels :
23+ runs-on : ${{ matrix.os }}
24+ strategy :
25+ fail-fast : false
26+ matrix :
27+ os : [ubuntu-latest, macos-latest, windows-latest]
28+ steps :
29+ - uses : actions/checkout@v4
30+
31+ - name : Set up MSVC (Windows)
32+ if : matrix.os == 'windows-latest'
33+ uses : ilammy/msvc-dev-cmd@v1
34+
35+ - name : Build wheels
36+ uses : pypa/cibuildwheel@v2.23
37+ env :
38+ CIBW_BUILD : " cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*"
39+ CIBW_SKIP : " *-musllinux_*"
40+ CIBW_ARCHS_LINUX : x86_64 aarch64
41+ CIBW_ARCHS_MACOS : x86_64 arm64
42+ CIBW_ARCHS_WINDOWS : AMD64
43+ CIBW_TEST_REQUIRES : pytest
44+ CIBW_TEST_COMMAND : pytest {project}/tests -v
45+ CIBW_BUILD_VERBOSITY : 1
46+ CMAKE_BUILD_PARALLEL_LEVEL : " 4"
47+
48+ - uses : actions/upload-artifact@v4
49+ with :
50+ name : wheels-${{ matrix.os }}
51+ path : wheelhouse/*.whl
52+
53+ upload :
54+ needs : [sdist, wheels]
55+ runs-on : ubuntu-latest
56+ if : github.event_name == 'release'
57+ permissions :
58+ id-token : write
59+ steps :
60+ - uses : actions/download-artifact@v4
61+ with :
62+ path : dist
63+ merge-multiple : true
64+
65+ - name : Publish to PyPI
66+ uses : pypa/gh-action-pypi-publish@release/v1
You can’t perform that action at this time.
0 commit comments