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:
20
.github/workflows/python-build.yml
vendored
Normal file
20
.github/workflows/python-build.yml
vendored
Normal 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
30
.github/workflows/python-release.yml
vendored
Normal 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
|
||||
3
.github/workflows/rust-release.yml
vendored
3
.github/workflows/rust-release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user