@@ -21,29 +21,17 @@ jobs:
2121 matrix :
2222 build :
2323 - {
24- NAME : linux-x64-glibc ,
24+ NAME : linux-x64,
2525 OS : ubuntu-24.04,
2626 TOOLCHAIN : stable,
2727 TARGET : x86_64-unknown-linux-gnu,
2828 }
2929 - {
30- NAME : linux-x64-musl,
31- OS : ubuntu-24.04,
32- TOOLCHAIN : stable,
33- TARGET : x86_64-unknown-linux-musl,
34- }
35- - {
36- NAME : linux-arm64-glibc,
30+ NAME : linux-arm64,
3731 OS : ubuntu-24.04-arm,
3832 TOOLCHAIN : stable,
3933 TARGET : aarch64-unknown-linux-gnu,
4034 }
41- - {
42- NAME : linux-arm64-musl,
43- OS : ubuntu-24.04-arm,
44- TOOLCHAIN : stable,
45- TARGET : aarch64-unknown-linux-musl,
46- }
4735 - {
4836 NAME : win32-x64-msvc,
4937 OS : windows-2025,
6048 - name : Checkout
6149 uses : actions/checkout@v4
6250
63- - name : Install dependencies
64- shell : bash
65- run : |
66- if [[ "${{ matrix.build.NAME }}" = *"-musl" ]]; then
67- sudo apt-get update
68- sudo apt-get install -y --no-install-recommends \
69- --allow-unauthenticated musl-tools
70- fi
71-
7251 - name : Install Rust ${{ matrix.build.TOOLCHAIN }}
7352 uses : dtolnay/rust-toolchain@stable
7453 with :
@@ -80,22 +59,29 @@ jobs:
8059 with :
8160 version : " 0.9.22"
8261
83- - name : Build Python wheels (linux x86-64 with sdist)
84- if : matrix.build.TARGET == 'x86_64-unknown-linux-gnu'
85- working-directory : pypi
62+ - name : Install Python 3.12
63+ run : uv python install 3.12
64+
65+ - name : Build Python wheels (Linux with cibuildwheel)
66+ if : runner.os == 'Linux'
8667 run : |
87- uv build --wheel --sdist --out- dir dist
68+ uv run cibuildwheel --output- dir pypi/ dist
8869
89- - name : Build Python wheels (other platforms )
90- if : matrix.build.TARGET != 'x86_64-unknown-linux-gnu '
70+ - name : Build Python wheels (Windows/macOS )
71+ if : runner.os != 'Linux '
9172 working-directory : pypi
9273 run : |
9374 uv build --wheel --out-dir dist
9475
95- - name : Install uv
96- uses : astral-sh/setup-uv@v7
97- with :
98- version : " 0.9.22"
76+ - name : Publish wheels to PyPI
77+ run : uv publish --trusted-publishing always pypi/dist/*.whl
9978
100- - name : Publish to PyPI
101- run : uv publish --trusted-publishing always pypi/dist/*
79+ - name : Build source distribution
80+ if : matrix.build.TARGET == 'x86_64-unknown-linux-gnu'
81+ working-directory : pypi
82+ run : |
83+ uv build --sdist --out-dir dist
84+
85+ - name : Publish source distribution to PyPI
86+ if : matrix.build.TARGET == 'x86_64-unknown-linux-gnu'
87+ run : uv publish --trusted-publishing always pypi/dist/*.tar.gz
0 commit comments