Skip to content

Test: build workflow #8

Test: build workflow

Test: build workflow #8

Workflow file for this run

name: Build Wheels
on:
workflow_dispatch:
push:
branches: [main, test-workflow]
pull_request:
branches: [main, test-workflow]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: astral-sh/setup-uv@v4
- uses: pypa/[email protected]
env:
CIBW_ENABLE: cpython-prerelease
CIBW_ARCHS_WINDOWS: auto ARM64
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: wheelhouse/*.whl
upload_all:
name: Upload if release
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
environment: pypi
permissions:
id-token: write
attestations: write
steps:
- uses: actions/setup-python@v5
with:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

Check failure on line 78 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build Wheels

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 78, Col: 25): A sequence was not expected
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
merge-multiple: true
path: dist
- name: Generate artifact attestation for sdist and wheels
uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/*"
- uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true