Skip to content

bump: version 1.0.1 to include license in sdist #7

bump: version 1.0.1 to include license in sdist

bump: version 1.0.1 to include license in sdist #7

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: read
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
# Host Rust installation (macOS) - Robust explicit install for cross-compilation
- name: Install Rust (macOS)
if: runner.os == 'macOS'
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
source $HOME/.cargo/env
rustup target add aarch64-apple-darwin x86_64-apple-darwin
rustup show
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# Host Rust installation (Windows) - Simple update
- name: Install Rust (Windows)
if: runner.os == 'Windows'
run: |
rustup update stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
# Only build for Python 3.10+ as per pyproject.toml
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
# Target platforms
CIBW_ARCHS_LINUX: x86_64
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_WINDOWS: AMD64
# Linux: Install Rust in the manylinux/musllinux container
CIBW_BEFORE_ALL_LINUX: "curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --profile minimal"
CIBW_ENVIRONMENT_LINUX: 'PATH="$PATH:$HOME/.cargo/bin"'
# Build backend verification
CIBW_BUILD_FRONTEND: build
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
publish_to_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # IMPORTANT: Mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1