mirror of
https://github.com/google/liblc3.git
synced 2026-04-18 05:35:31 +00:00
python: Build python wrapper wheels with github actions
This commit is contained in:
committed by
Antoine SOULIER
parent
f301a22413
commit
47f801dffb
57
.github/workflows/pypi.yaml
vendored
Normal file
57
.github/workflows/pypi.yaml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: pypi
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
cache: 'pip'
|
||||||
|
- run: |
|
||||||
|
pip install auditwheel patchelf
|
||||||
|
pip wheel . -w wheel
|
||||||
|
auditwheel repair -w dist --plat=manylinux_2_17_x86_64 wheel/*.whl
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: python-package-linux
|
||||||
|
path: dist/*.whl
|
||||||
|
|
||||||
|
build-macos:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
cache: 'pip'
|
||||||
|
- run: |
|
||||||
|
pip wheel . -w dist
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: python-package-macos
|
||||||
|
path: dist/*.whl
|
||||||
|
|
||||||
|
publish:
|
||||||
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build-linux, build-macos]
|
||||||
|
environment:
|
||||||
|
name: pypi
|
||||||
|
url: https://pypi.org/p/pylc3
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
merge-multiple: true
|
||||||
|
path: dist/
|
||||||
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
Reference in New Issue
Block a user