fix: exclude test data from package, add release optimizations #9
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "klaw-dbase-v*" | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: "Dry run (don't publish to PyPI)" | |
| required: false | |
| default: true | |
| type: boolean | |
| permissions: | |
| contents: read | |
| env: | |
| PACKAGE_NAME: klaw-dbase | |
| PYTHON_VERSION: "3.13" | |
| jobs: | |
| linux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: depot-ubuntu-24.04-4 | |
| target: x86_64 | |
| - runner: depot-ubuntu-24.04-arm-4 | |
| target: aarch64 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| manylinux: auto | |
| working-directory: workspaces/rust/klaw-dbase | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: workspaces/rust/klaw-dbase/dist | |
| musllinux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: depot-ubuntu-24.04-4 | |
| target: x86_64 | |
| - runner: depot-ubuntu-24.04-arm-4 | |
| target: aarch64 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| manylinux: musllinux_1_2 | |
| working-directory: workspaces/rust/klaw-dbase | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-musllinux-${{ matrix.platform.target }} | |
| path: workspaces/rust/klaw-dbase/dist | |
| windows: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: depot-windows-2022-4 | |
| target: x64 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| working-directory: workspaces/rust/klaw-dbase | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-windows-${{ matrix.platform.target }} | |
| path: workspaces/rust/klaw-dbase/dist | |
| macos: | |
| runs-on: macos-15 | |
| strategy: | |
| matrix: | |
| platform: | |
| - target: aarch64 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| run: uv python install ${{ env.PYTHON_VERSION }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist | |
| sccache: "true" | |
| working-directory: workspaces/rust/klaw-dbase | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-macos-${{ matrix.platform.target }} | |
| path: workspaces/rust/klaw-dbase/dist | |
| sdist: | |
| runs-on: depot-ubuntu-24.04-4 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| working-directory: workspaces/rust/klaw-dbase | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-sdist | |
| path: workspaces/rust/klaw-dbase/dist | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: depot-ubuntu-24.04-4 | |
| needs: [linux, musllinux, windows, macos, sdist] | |
| if: startsWith(github.ref, 'refs/tags/') && !inputs.dry_run | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/klaw-dbase | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |