@@ -2,6 +2,9 @@ name: Release to PyPI
22
33on :
44 workflow_dispatch : # Manual trigger only
5+ push :
6+ tags :
7+ - " v[0-9]*" # Trigger on version tags like v1.0.0
58
69permissions :
710 # IMPORTANT: this permission is mandatory for Trusted Publishing
1720 fail-fast : false
1821 matrix :
1922 build :
20- # Linux wheels were omitted from the first 0.6.0 PyPI attempt and
21- # are intentionally isolated here so existing filenames are not
22- # uploaded again.
23+ - {
24+ NAME : linux-x64,
25+ OS : ubuntu-24.04,
26+ TOOLCHAIN : 1.94.1,
27+ TARGET : x86_64-unknown-linux-gnu,
28+ MANYLINUX : manylinux_2_28,
29+ ZIG : 0.15.1,
30+ }
31+ - {
32+ NAME : linux-x64,
33+ OS : ubuntu-24.04,
34+ TOOLCHAIN : 1.94.1,
35+ TARGET : x86_64-unknown-linux-musl,
36+ ZIG : 0.15.1,
37+ }
38+ # Linux wheels use explicit Zig versions per architecture.
2339 - {
2440 NAME : linux-arm64,
2541 OS : ubuntu-24.04-arm,
2844 MANYLINUX : manylinux_2_28,
2945 ZIG : 0.14.1,
3046 }
47+ - {
48+ NAME : linux-riscv64,
49+ OS : ubuntu-24.04,
50+ TOOLCHAIN : 1.94.1,
51+ TARGET : riscv64gc-unknown-linux-gnu,
52+ MANYLINUX : manylinux_2_31,
53+ ZIG : 0.15.1,
54+ }
55+ - {
56+ NAME : linux-riscv64,
57+ OS : ubuntu-24.04,
58+ TOOLCHAIN : 1.94.1,
59+ TARGET : riscv64gc-unknown-linux-musl,
60+ ZIG : 0.15.1,
61+ }
62+ - {
63+ NAME : win32-x64-msvc,
64+ OS : windows-2025,
65+ TOOLCHAIN : 1.94.1,
66+ TARGET : x86_64-pc-windows-msvc,
67+ }
68+ - {
69+ NAME : win32-arm64-msvc,
70+ OS : windows-11-vs2026-arm,
71+ TOOLCHAIN : 1.94.1,
72+ TARGET : aarch64-pc-windows-msvc,
73+ }
74+ - {
75+ NAME : darwin-arm64,
76+ OS : macos-15,
77+ TOOLCHAIN : 1.94.1,
78+ TARGET : aarch64-apple-darwin,
79+ }
80+ - {
81+ NAME : darwin-x64,
82+ OS : macos-15-intel,
83+ TOOLCHAIN : 1.94.1,
84+ TARGET : x86_64-apple-darwin,
85+ }
3186 - {
3287 NAME : linux-arm64,
3388 OS : ubuntu-24.04-arm,
@@ -77,5 +132,38 @@ jobs:
77132 uvx --from maturin==1.12.3 --with ziglang==${{ matrix.build.ZIG }} \
78133 maturin build --release --target ${{ matrix.build.TARGET }} --zig --out dist
79134
135+ - name : Build Python wheel (Windows ARM64)
136+ if : matrix.build.TARGET == 'aarch64-pc-windows-msvc'
137+ working-directory : pypi
138+ shell : bash
139+ run : |
140+ uvx --from maturin==1.12.3 maturin build --release \
141+ --target aarch64-pc-windows-msvc --out dist
142+
143+ - name : Build Python wheels (Windows/macOS)
144+ if : runner.os != 'Linux' && matrix.build.TARGET != 'aarch64-pc-windows-msvc'
145+ working-directory : pypi
146+ run : uv build --wheel --out-dir dist
147+
80148 - name : Publish wheels to PyPI
81149 run : uv publish --trusted-publishing always pypi/dist/*.whl
150+
151+ publish-source :
152+ name : Publish source distribution
153+ runs-on : ubuntu-24.04
154+ environment : pypi_release
155+ steps :
156+ - name : Checkout
157+ uses : actions/checkout@v7
158+
159+ - name : Install uv
160+ uses : astral-sh/setup-uv@v7
161+ with :
162+ version : " 0.9.22"
163+
164+ - name : Build source distribution
165+ working-directory : pypi
166+ run : uv build --sdist --out-dir dist
167+
168+ - name : Publish source distribution to PyPI
169+ run : uv publish --trusted-publishing always pypi/dist/*.tar.gz
0 commit comments