mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Python Package
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_wheels:
|
|
name: Build wheels on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
# Run locally with: pipx run cibuildwheel --platform linux python
|
|
- name: Build wheels
|
|
uses: pypa/cibuildwheel@v3.1.4
|
|
with:
|
|
package-dir: python
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: opendht-wheels-${{ matrix.os }}
|
|
path: ./wheelhouse/*.whl
|
|
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
needs: build_wheels
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: opendht-wheels-*
|
|
path: dist
|
|
merge-multiple: true
|
|
|
|
- name: Publish package
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
password: ${{ secrets.PYPI_API_TOKEN }}
|