diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml index 30bcfad..fc8a4ab 100644 --- a/.github/workflows/python-build.yml +++ b/.github/workflows/python-build.yml @@ -9,9 +9,6 @@ on: types: [created] jobs: - # ============================ - # BUILD (multi-architecture) - # ============================ build-python-packages: strategy: fail-fast: false @@ -27,50 +24,23 @@ jobs: run: cargo run --bin stub_gen - name: Install Python build dependencies - run: pip install maturin==1.8.2 + run: pip install maturin==1.10.2 - name: Build Python packages run: maturin build --sdist --release -m pyadb_client/Cargo.toml - - name: Upload wheels as artifacts - uses: actions/upload-artifact@v4 - with: - name: wheels-${{ matrix.arch }} - path: target/wheels/* - if-no-files-found: error - - # ================================ - # PUBLISH (release creation only) - # ================================ - publish: - name: Publish to PyPI & GitHub Release - if: github.event_name == 'release' && github.event.action == 'created' - needs: build-python-packages - runs-on: ubuntu-latest - - steps: - - name: Install maturin - run: pip install maturin==1.8.2 - - - name: Download wheels for x86_64 - uses: actions/download-artifact@v4 - with: - name: wheels-x86_64 - path: dist/x86_64 - - - name: Download wheels for arm64 - uses: actions/download-artifact@v4 - with: - name: wheels-arm64 - path: dist/arm64 - + # ========================== + # PUBLISH (release only) + # ========================== - name: Publish Python packages to PyPI - run: maturin publish dist/**/*.whl --non-interactive + if: github.event_name == 'release' && github.event.action == 'created' + run: maturin publish --skip-existing --non-interactive -m pyadb_client/Cargo.toml env: MATURIN_PYPI_TOKEN: ${{ secrets.MATURIN_PYPI_TOKEN }} - name: Publish GitHub release artifacts + if: github.event_name == 'release' && github.event.action == 'created' uses: softprops/action-gh-release@v2 with: files: | - dist/**/*.whl + target/wheels/*.whl