chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.6.8 #1150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Distribution | |
on: [push, pull_request] | |
jobs: | |
build_wheels: | |
name: Build wheel for ${{ matrix.config.platform }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- os: ubuntu-24.04 | |
arch: x86_64 | |
platform: manylinux_x86_64 | |
- os: ubuntu-24.04 | |
arch: aarch64 | |
platform: manylinux_aarch64 | |
- os: macos-13 | |
arch: x86_64 | |
platform: macosx_x86_64 | |
- os: macos-14 | |
arch: arm64 | |
platform: macosx_arm64 | |
- os: windows-2022 | |
arch: AMD64 | |
platform: win_amd64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Build wheel | |
uses: pypa/[email protected] | |
env: | |
CIBW_ARCHS: ${{ matrix.config.arch }} | |
CIBW_BUILD: cp*-${{ matrix.config.platform }} | |
CIBW_SKIP: cp36* cp37* cp38* | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: ./wheelhouse/*.whl | |
name: wheel-${{ matrix.config.platform }} | |
sdist: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: pip | |
cache-dependency-path: requirements*.txt | |
- name: Install dependencies | |
run: pip install -r requirements-test.txt | |
- name: build | |
run: python -m build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
name: sdist | |
check: | |
needs: | |
- sdist | |
- build_wheels | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: pip | |
cache-dependency-path: requirements*.txt | |
- name: Install dependencies | |
run: pip install -r requirements-test.txt | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- run: twine check dist/*.whl | |
publish: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
needs: | |
- check | |
runs-on: ubuntu-22.04 | |
permissions: | |
# this permission is mandatory for trusted publishing | |
id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |