feat: Python package (#80)

* feat: create pyadb_client python package

* feat: add push / pull methods

* feat: add shell_command for USB

* feat(ci): add python package build
This commit is contained in:
cli
2025-01-22 15:22:36 +01:00
committed by GitHub
parent 144072ba1b
commit 466d00e68a
15 changed files with 303 additions and 6 deletions

20
.github/workflows/python-build.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Python - Build
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build-release-python:
name: "build-release-python"
runs-on: ubuntu-latest
defaults:
run:
working-directory: pyadb_client
steps:
- uses: actions/checkout@v4
- name: Install Python dependencies
run: pip install .
- name: Build project
run: maturin build --release

30
.github/workflows/python-release.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Rust - Release creation
on:
release:
types: [created]
jobs:
create-release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pyadb_client
steps:
- uses: actions/checkout@v4
- name: Install Python dependencies
run: pip install .
- name: Publish Python package
run: maturin publish --non-interactive
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

View File

@@ -9,8 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- uses: actions/checkout@v4
- name: "Set up Rust"
uses: actions-rs/toolchain@v1