Skip to content

Configure skips

Configure skips #10

Workflow file for this run

name: release
on:
push:
tags:
- v*
pull_request:
jobs:
builds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
run: uvx [email protected] --output-dir dist
env:
CIBW_BEFORE_BUILD: pip install -e . && python build.py
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: pytest --showlocals {package}/tests
CIBW_SKIP: "{cp36-*,cp37-*,pp*}" # Skip Python 3.6 and 3.7, as well as PyPy
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: auto aarch64
# CIBW_BUILD_VERBOSITY: 3
- uses: actions/upload-artifact@v4
with:
name: wheelhouse-${{ matrix.os }}
path: dist
upload:
# Skip this step on pull requests. Run only when pushing a version tag.
if: startsWith(github.ref, 'refs/tags/v')
needs: builds
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/textual-tree-sitter-languages
permissions:
id-token: write # Mandatory for trusted publishing to PyPI
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Stage wheels
uses: actions/download-artifact@v4
with:
pattern: wheelhouse-*
merge-multiple: true
path: dist
- run: |
ls -l dist/
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1