vision-squeezer 0.2.0

LLM-native image optimization middleware & MCP server. Reduces vision model token consumption by snapping to tile boundaries.
Documentation
name: Python wheels

on:
  push:
    tags: ["v*"]
  workflow_dispatch:

jobs:
  linux:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target: [x86_64, aarch64]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.target }}
          args: --release --out dist --manifest-path python/Cargo.toml --interpreter 3.8 3.9 3.10 3.11 3.12 3.13
          sccache: "true"
          manylinux: auto
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-linux-${{ matrix.target }}
          path: dist

  macos:
    runs-on: macos-latest
    strategy:
      matrix:
        target: [aarch64, x86_64]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.target }}
          args: --release --out dist --manifest-path python/Cargo.toml
          sccache: "true"
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-macos-${{ matrix.target }}
          path: dist

  windows:
    runs-on: windows-latest
    strategy:
      matrix:
        target: [x64]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Build wheels
        uses: PyO3/maturin-action@v1
        with:
          target: ${{ matrix.target }}
          args: --release --out dist --manifest-path python/Cargo.toml
          sccache: "true"
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-windows-${{ matrix.target }}
          path: dist

  sdist:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build sdist
        uses: PyO3/maturin-action@v1
        with:
          command: sdist
          args: --out dist --manifest-path python/Cargo.toml
      - uses: actions/upload-artifact@v4
        with:
          name: wheels-sdist
          path: dist

  # ─────────────────────────────────────────────────────────────────────────
  # PyPI publish — disabled by default. To enable:
  #   1. Create a PyPI account: https://pypi.org/account/register/
  #   2. Reserve the project name "vision-squeezer" on PyPI (push a first
  #      manual release, or contact PyPI support if the name is taken).
  #   3. Add a Trusted Publisher (no API token needed):
  #      https://pypi.org/manage/account/publishing/
  #      Owner: eralpozcan
  #      Repo:  vision-squeezer
  #      Workflow filename: python.yml
  #      Environment name: pypi
  #   4. Create a GitHub environment named "pypi" with no protection rules.
  #   5. Uncomment the job below.
  #
  # release:
  #   name: Publish to PyPI
  #   runs-on: ubuntu-latest
  #   if: startsWith(github.ref, 'refs/tags/v')
  #   needs: [linux, macos, windows, sdist]
  #   environment:
  #     name: pypi
  #     url: https://pypi.org/p/vision-squeezer
  #   permissions:
  #     id-token: write
  #   steps:
  #     - uses: actions/download-artifact@v4
  #       with:
  #         pattern: wheels-*
  #         merge-multiple: true
  #         path: dist
  #     - name: Publish
  #       uses: PyO3/maturin-action@v1
  #       with:
  #         command: upload
  #         args: --skip-existing dist/*