Skip to content

chnage pypi config

chnage pypi config #13

Workflow file for this run

name: Build and Publish
on:
push:
tags:
- "v*"
jobs:
build_wheels:
name: Build wheels (${{ matrix.os }}, ${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
# Linux x86_64 — manylinux_2_28 container (GCC 14)
- os: linux
arch: x86_64
runner: ubuntu-latest
cibw_archs: x86_64
# Linux aarch64 — native ARM runner (no Docker/QEMU)
- os: linux
arch: aarch64
runner: ubuntu-24.04-arm
cibw_archs: aarch64
# macOS Apple Silicon (native)
- os: macos
arch: arm64
runner: macos-14
cibw_archs: arm64
# Windows x64
- os: windows
arch: AMD64
runner: windows-latest
cibw_archs: AMD64
steps:
- uses: actions/checkout@v4
- name: Install deps (macOS)
if: matrix.os == 'macos'
run: brew install libdeflate brotli || true
- name: Install zlib (Windows)
if: matrix.os == 'windows'
run: vcpkg install zlib:x64-windows
- name: Install cibuildwheel
run: pip install cibuildwheel==2.22.0
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp312-* cp313-* cp314-*"
CIBW_SKIP: "*-musllinux* *-win32 *-manylinux_i686"
CIBW_ARCHS: ${{ matrix.cibw_archs }}
# Linux: use manylinux_2_28 (GCC 14, glibc 2.28) — required for C++20 features
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux_2_28_x86_64
CIBW_MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64
# Linux: install compression libs inside manylinux container
CIBW_BEFORE_BUILD_LINUX: dnf install -y libdeflate-devel brotli-devel || true
# macOS: brew libs on macos-14 runner require deployment target 14.0
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=14.0
# Windows: pass vcpkg toolchain
CIBW_CONFIG_SETTINGS_WINDOWS: >
cmake.define.CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake.define.VCPKG_TARGET_TRIPLET=x64-windows
CIBW_BUILD_VERBOSITY: 1
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-${{ matrix.arch }}
path: wheelhouse/*.whl
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
publish:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Install twine
run: pip install twine
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*
- name: Attach release notes to GitHub release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md