name: Publish Python distribution to PyPI
description: Build and publish the Python package from Server/ to PyPI
runs:
  using: composite
  steps:
    - name: Install uv
      uses: astral-sh/setup-uv@v7
      with:
        version: "latest"
        enable-cache: true
        cache-dependency-glob: "Server/uv.lock"

    - name: Build a binary wheel and a source tarball
      shell: bash
      run: uv build
      working-directory: ./Server

    - name: Publish distribution to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        packages-dir: Server/dist/
