feat: improve python-build.yml (#92)
This commit is contained in:
25
.github/workflows/python-build.yml
vendored
25
.github/workflows/python-build.yml
vendored
@@ -7,43 +7,28 @@ on:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
gen-stubs:
|
||||
name: "build-release"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build project
|
||||
run: cargo run --bin stub_gen
|
||||
|
||||
build-python-packages:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build Python stubs
|
||||
run: cargo run --bin stub_gen
|
||||
|
||||
- name: Install Python build dependencies
|
||||
run: pip install maturin==1.8.2
|
||||
|
||||
- name: Build Python packages
|
||||
run: maturin build --sdist --release -m pyadb_client/Cargo.toml
|
||||
|
||||
publish-python-packages:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-python-packages]
|
||||
if: github.event_name == 'release' && github.event.action == 'created'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Python build dependencies
|
||||
run: pip install maturin==1.8.2
|
||||
|
||||
- name: Publish Python packages
|
||||
if: github.event_name == 'release' && github.event.action == 'created'
|
||||
run: maturin publish -m pyadb_client/Cargo.toml --non-interactive
|
||||
env:
|
||||
MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }}
|
||||
|
||||
- name: "Publish GitHub artefacts"
|
||||
if: github.event_name == 'release' && github.event.action == 'created'
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
|
||||
Reference in New Issue
Block a user