name: deploy

# only when a version is released
on:
  release:
    types: [published]

jobs:

  pypi:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.12"]
    steps:
      - uses: actions/checkout@v6
      - name: Install uv
        uses: astral-sh/setup-uv@v8.0.0
        with:
          python-version: ${{ matrix.python-version }}
      - name: Publish to PyPI
        run: |
          uv build
          uv publish --username ${{ secrets.PYPI_USER }} --password ${{ secrets.PYPI_PASSWORD }}
        if: success()
