name: Publish to PyPI

on:
  push:
    branches:
      - main

defaults:
  run:
    working-directory: ./cli

jobs:
  build-and-publish:
    if: false # TODO: enable this when ready
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.x'
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install build
      - name: Build
        run: python -m build
      - name: Publish
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.PYPI_PASSWORD }}
