Skip to content

Commit

Permalink
feat(ci): add python package build
Browse files Browse the repository at this point in the history
  • Loading branch information
cli-s1n committed Jan 22, 2025
1 parent 96075bc commit 8d8c9df
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/python-build.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 30 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 1 addition & 2 deletions .github/workflows/rust-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d8c9df

Please sign in to comment.