Skip to content

chore(main): release 0.6.0 (#2) #1

chore(main): release 0.6.0 (#2)

chore(main): release 0.6.0 (#2) #1

Workflow file for this run

on:
push:
tags:
- '*.*'
name: Publish Python bindings
env:
MIN_PYTHON_VERSION: 3.8
jobs:
macos-wheels:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target: [universal2-apple-darwin]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
- name: Test wheel installation
run: |
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.target }}
path: dist
linux-wheels:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [x86_64, x86, aarch64, armv7]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
manylinux: auto
- name: Test wheel installation
if: matrix.target == 'x86_64'
run: |
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist
windows-wheels:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ env.MIN_PYTHON_VERSION }}
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
sccache: 'true'
- name: Test wheel installation
run: |
pip install accesskit --no-index --find-links dist --force-reinstall
python -c "import accesskit"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: dist
pypi-release:
name: Publish to PyPI
environment: release
permissions:
id-token: write
if: "startsWith(github.ref, 'refs/tags/')"
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing *
github-release:
name: Add to GitHub release
if: "startsWith(github.ref, 'refs/tags/')"
needs: [macos-wheels, linux-wheels, windows-wheels, sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- uses: AButler/upload-release-assets@v3.0
with:
files: "dist/*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: ${{ github.ref_name }}