Skip to content

python: Build python wrapper wheels with github actions #29

python: Build python wrapper wheels with github actions

python: Build python wrapper wheels with github actions #29

Workflow file for this run

name: wheels
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
id-token: write
jobs:
build:
strategy:
matrix:
os: [macos13, macos-latest]
# os: [ubuntu-latest, macos13, macos-latest]
runs-on: ${{ matrix.os }}
environment:
name: pypi
url: https://pypi.org/p/pylc3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
pip install auditwheel patchelf
pip wheel . -w wheel
auditwheel repair -w dist --plat=manylinux_2_17_x86_64 wheel/*.whl
- if: ${{ matrix.os == 'macos13' || matrix.os == 'macos-latest' }}
run: |
pip wheel . -w dist
- uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish:
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1