feat: pyo3 stub generation #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python - Build packages & Release | |
on: | |
push: {} | |
pull_request: {} | |
release: | |
types: [created] | |
jobs: | |
gen-stubs: | |
name: "build-release" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build project | |
run: cargo run --bin stub_gen | |
build-python-packages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python build dependencies | |
run: pip install ".[build]" | |
- name: Build Python packages | |
run: maturin build --release --compatibility manylinux_2_25 --auditwheel=skip | |
publish-python-packages: | |
runs-on: ubuntu-latest | |
needs: [build-python-packages] | |
if: github.event_name == 'release' && github.event.action == 'created' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Python build dependencies | |
run: pip install ".[build]" | |
- name: Publish Python packages | |
run: maturin publish --non-interactive --compatibility manylinux_2_25 --auditwheel=skip | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }} | |
- name: "Publish GitHub artefacts" | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
target/wheels/pyadb_client*.whl | |
target/wheels/pyadb_client*.tar.gz |