Skip to content

Commit

Permalink
ci: build python wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
cocool97 committed Jan 24, 2025
1 parent 775b242 commit 5858f73
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Python - Release creation

on:
push: {}
pull_request: {}
release:
types: [created]

jobs:
create-release:
build-python-packages:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -17,8 +19,25 @@ jobs:
- name: Install Python dependencies
run: pip install .

- name: Publish Python package
run: maturin publish --non-interactive --no-sdist
- 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 --no-interactive
env:
MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }}

Expand All @@ -27,4 +46,4 @@ jobs:
with:
files: |
target/wheels/pyadb_client*.whl
target/wheels/pyadb_client*.tar.gz
target/wheels/pyadb_client*.tar.gz
2 changes: 1 addition & 1 deletion pyadb_client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = ["maturin>=1,<2"]
build-backend = "maturin"

[project]
dependencies = ["maturin", "patchelf"]
name = "pyadb_client"
dependencies = ["maturin", "patchelf"]
dynamic = ["version"] # Let the build system automatically set package version
classifiers = [
"Programming Language :: Rust",
Expand Down

0 comments on commit 5858f73

Please sign in to comment.