Update to 0.2.0 (#25) #5
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Python SDK | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Build all Python packages on Linux (pure + backend wheels). | |
| build-linux: | |
| if: ${{ !github.event.act }} | |
| name: Build Linux packages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-key: release | |
| rustflags: "" | |
| - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| - name: Install Python | |
| run: uv python install 3.12 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: "latest" | |
| cache: npm | |
| cache-dependency-path: src/wasm_sandbox/guests/javascript/package-lock.json | |
| - name: Install just | |
| run: cargo install --locked just | |
| - name: Install clang | |
| run: sudo apt-get update && sudo apt-get install -y clang | |
| - name: Build all Python packages | |
| run: just python-dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-wheels-linux | |
| path: dist/pythonsdk/ | |
| # Build Windows-specific maturin backend wheels only. | |
| build-windows: | |
| if: ${{ !github.event.act }} | |
| name: Build Windows backend wheels | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 # v1.15.4 | |
| with: | |
| cache-key: release | |
| rustflags: "" | |
| - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| - name: Install Python | |
| run: uv python install 3.12 | |
| - name: Install just | |
| run: cargo install --locked just | |
| - name: Install LLVM | |
| run: choco install llvm -y | |
| - name: Build backend wheels | |
| run: just python-dist-backends | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-wheels-windows | |
| path: dist/pythonsdk/ | |
| # Merge artifacts from both platforms and publish to PyPI. | |
| publish: | |
| if: ${{ !github.event.act }} | |
| name: Publish to PyPI | |
| needs: [build-linux, build-windows] | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 | |
| - name: Install just | |
| run: cargo install --locked just | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: dist/pythonsdk/ | |
| merge-multiple: true | |
| pattern: python-wheels-* | |
| - name: Publish to PyPI | |
| run: just python python-publish |