Skip to content

Bump documentation for 0.4.0 release #32

Bump documentation for 0.4.0 release

Bump documentation for 0.4.0 release #32

Workflow file for this run

name: Release to PyPI
on:
workflow_dispatch: # Manual trigger only
push:
tags:
- "v[0-9]*" # Trigger on version tags like v1.0.0
permissions:
# IMPORTANT: this permission is mandatory for Trusted Publishing
id-token: write
contents: read
jobs:
publish-binaries:
name: Publish binaries
runs-on: ${{ matrix.build.os }}
environment: pypi_release
strategy:
fail-fast: false
matrix:
build:
- {
NAME: linux-x64,
OS: ubuntu-24.04,
TOOLCHAIN: stable,
TARGET: x86_64-unknown-linux-gnu,
}
- {
NAME: linux-x64,
OS: ubuntu-24.04,
TOOLCHAIN: stable,
TARGET: x86_64-unknown-linux-musl,
}
- {
NAME: linux-arm64,
OS: ubuntu-24.04-arm,
TOOLCHAIN: stable,
TARGET: aarch64-unknown-linux-gnu,
}
- {
NAME: linux-arm64,
OS: ubuntu-24.04-arm,
TOOLCHAIN: stable,
TARGET: aarch64-unknown-linux-musl,
}
- {
NAME: win32-x64-msvc,
OS: windows-2025,
TOOLCHAIN: stable,
TARGET: x86_64-pc-windows-msvc,
}
- {
NAME: darwin-arm64,
OS: macos-15,
TOOLCHAIN: stable,
TARGET: aarch64-apple-darwin,
}
- {
NAME: darwin-x64,
OS: macos-15-intel,
TOOLCHAIN: stable,
TARGET: x86_64-apple-darwin,
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust ${{ matrix.build.TOOLCHAIN }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.build.TOOLCHAIN }}
targets: ${{ matrix.build.TARGET }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.22"
- name: Install Python 3.12
run: uv python install 3.12
- name: Build Python wheels (Linux manylinux with Zig)
if: runner.os == 'Linux' && contains(matrix.build.TARGET, '-gnu')
working-directory: pypi
run: |
uvx --from maturin==1.11.5 --with ziglang==0.15.1 --with cargo-zigbuild==0.21.6 \
maturin build --release --target ${{ matrix.build.TARGET }} --zig --compatibility manylinux_2_28 --out dist
- name: Build Python wheels (Linux musllinux with Zig)
if: runner.os == 'Linux' && contains(matrix.build.TARGET, '-musl')
working-directory: pypi
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
uvx --from maturin==1.11.5 --with ziglang==0.15.1 --with cargo-zigbuild==0.21.6 \
maturin build --release --target ${{ matrix.build.TARGET }} --zig --out dist
- name: Build Python wheels (Windows/macOS)
if: runner.os != 'Linux'
working-directory: pypi
run: |
uv build --wheel --out-dir dist
- name: Publish wheels to PyPI
run: uv publish --trusted-publishing always pypi/dist/*.whl
- name: Build source distribution
if: matrix.build.TARGET == 'x86_64-unknown-linux-gnu'
working-directory: pypi
run: |
uv build --sdist --out-dir dist
- name: Publish source distribution to PyPI
if: matrix.build.TARGET == 'x86_64-unknown-linux-gnu'
run: uv publish --trusted-publishing always pypi/dist/*.tar.gz