chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.1.6 #858
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-22.04 | |
arch: x86_64 | |
platform: manylinux_x86_64 | |
- os: ubuntu-22.04 | |
arch: aarch64 | |
platform: manylinux_aarch64 | |
- os: macos-12 | |
arch: x86_64 | |
platform: macosx_x86_64 | |
- os: macos-12 | |
arch: arm64 | |
platform: macosx_arm64 | |
- os: windows-2019 | |
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* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
sdist: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
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@v3 | |
with: | |
path: dist/*.tar.gz | |
check: | |
needs: | |
- sdist | |
- build_wheels | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
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@v3 | |
with: | |
# unpacks default artifact into dist/ | |
# if `name: artifact` is omitted, the action will create extra parent dir | |
name: artifact | |
path: dist | |
- 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@v3 | |
with: | |
# unpacks default artifact into dist/ | |
# if `name: artifact` is omitted, the action will create extra parent dir | |
name: artifact | |
path: dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |