Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38d8384b98 | ||
|
|
39591b6a0a |
53
.github/workflows/python-build.yml
vendored
53
.github/workflows/python-build.yml
vendored
@@ -1,20 +1,49 @@
|
|||||||
name: Python - Build
|
name: Python - Build packages & Release
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push: {}
|
||||||
env:
|
pull_request: {}
|
||||||
CARGO_TERM_COLOR: always
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-release-python:
|
build-python-packages:
|
||||||
name: "build-release-python"
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: pyadb_client
|
working-directory: pyadb_client
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install Python dependencies
|
|
||||||
run: pip install .
|
- name: Install Python dependencies
|
||||||
- name: Build project
|
run: pip install .
|
||||||
run: maturin build --release
|
|
||||||
|
- name: Build Python packages
|
||||||
|
run: maturin build --release --interpreter "3.8" --interpreter "3.9" --interpreter "3.10" --interpreter "3.11" --interpreter "3.12" --interpreter "3.13"
|
||||||
|
|
||||||
|
publish-python-packages:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: pyadb_client
|
||||||
|
needs: [build-python-packages]
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'created'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Python dependencies
|
||||||
|
run: pip install .
|
||||||
|
|
||||||
|
- name: Publish Python packages
|
||||||
|
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
|
||||||
30
.github/workflows/python-release.yml
vendored
30
.github/workflows/python-release.yml
vendored
@@ -1,30 +0,0 @@
|
|||||||
name: Python - 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 --no-sdist
|
|
||||||
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
|
|
||||||
@@ -9,7 +9,7 @@ homepage = "https://github.com/cocool97/adb_client"
|
|||||||
keywords = ["adb", "android", "tcp", "usb"]
|
keywords = ["adb", "android", "tcp", "usb"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/cocool97/adb_client"
|
repository = "https://github.com/cocool97/adb_client"
|
||||||
version = "2.1.2"
|
version = "2.1.4"
|
||||||
|
|
||||||
# To build locally when working on a new release
|
# To build locally when working on a new release
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ requires = ["maturin>=1,<2"]
|
|||||||
build-backend = "maturin"
|
build-backend = "maturin"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
dependencies = ["maturin", "patchelf"]
|
|
||||||
name = "pyadb_client"
|
name = "pyadb_client"
|
||||||
|
dependencies = ["maturin", "patchelf"]
|
||||||
dynamic = ["version"] # Let the build system automatically set package version
|
dynamic = ["version"] # Let the build system automatically set package version
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Rust",
|
"Programming Language :: Rust",
|
||||||
|
|||||||
Reference in New Issue
Block a user