@@ -10,23 +10,126 @@ permissions:
1010 contents : read
1111
1212jobs :
13- build-and-publish :
14- runs-on : ubuntu-latest
13+ # Build wheels for Linux
14+ linux :
15+ runs-on : ${{ matrix.platform.runner }}
16+ strategy :
17+ matrix :
18+ platform :
19+ - runner : ubuntu-latest
20+ target : x86_64
21+ - runner : ubuntu-latest
22+ target : aarch64
23+ steps :
24+ - uses : actions/checkout@v6
25+
26+ - uses : actions/setup-python@v6
27+ with :
28+ python-version : " 3.13"
29+
30+ - name : Build wheels
31+ uses : PyO3/maturin-action@v1
32+ with :
33+ target : ${{ matrix.platform.target }}
34+ args : --release --out dist
35+ sccache : " true"
36+ manylinux : auto
37+
38+ - name : Upload wheels
39+ uses : actions/upload-artifact@v6
40+ with :
41+ name : wheels-linux-${{ matrix.platform.target }}
42+ path : dist
43+
44+ # Build wheels for macOS
45+ macos :
46+ runs-on : ${{ matrix.platform.runner }}
47+ strategy :
48+ matrix :
49+ platform :
50+ - runner : macos-13
51+ target : x86_64
52+ - runner : macos-14
53+ target : aarch64
1554 steps :
16- - name : Checkout
17- uses : actions/checkout@v6
55+ - uses : actions/checkout@v6
56+
57+ - uses : actions/setup-python@v6
58+ with :
59+ python-version : " 3.13"
60+
61+ - name : Build wheels
62+ uses : PyO3/maturin-action@v1
63+ with :
64+ target : ${{ matrix.platform.target }}
65+ args : --release --out dist
66+ sccache : " true"
67+
68+ - name : Upload wheels
69+ uses : actions/upload-artifact@v6
1870 with :
19- fetch-depth : 0
71+ name : wheels-macos-${{ matrix.platform.target }}
72+ path : dist
2073
21- - name : Install uv
22- uses : astral-sh/setup-uv@v7
74+ # Build wheels for Windows
75+ windows :
76+ runs-on : ${{ matrix.platform.runner }}
77+ strategy :
78+ matrix :
79+ platform :
80+ - runner : windows-latest
81+ target : x64
82+ steps :
83+ - uses : actions/checkout@v6
84+
85+ - uses : actions/setup-python@v6
2386 with :
24- version : " 0.8.3"
25- enable-cache : true
2687 python-version : " 3.13"
88+ architecture : ${{ matrix.platform.target }}
89+
90+ - name : Build wheels
91+ uses : PyO3/maturin-action@v1
92+ with :
93+ target : ${{ matrix.platform.target }}
94+ args : --release --out dist
95+ sccache : " true"
96+
97+ - name : Upload wheels
98+ uses : actions/upload-artifact@v6
99+ with :
100+ name : wheels-windows-${{ matrix.platform.target }}
101+ path : dist
102+
103+ # Build source distribution
104+ sdist :
105+ runs-on : ubuntu-latest
106+ steps :
107+ - uses : actions/checkout@v6
108+
109+ - name : Build sdist
110+ uses : PyO3/maturin-action@v1
111+ with :
112+ command : sdist
113+ args : --out dist
114+
115+ - name : Upload sdist
116+ uses : actions/upload-artifact@v6
117+ with :
118+ name : wheels-sdist
119+ path : dist
27120
28- - name : Build package
29- run : uv build
121+ # Publish to PyPI
122+ publish :
123+ name : Publish to PyPI
124+ runs-on : ubuntu-latest
125+ needs : [linux, macos, windows, sdist]
126+ steps :
127+ - name : Download all artifacts
128+ uses : actions/download-artifact@v7
129+ with :
130+ path : dist
131+ pattern : wheels-*
132+ merge-multiple : true
30133
31134 - name : Publish to PyPI
32135 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments