name: deploy

on:
  push:
    tags:
    - '*'

jobs:
  pypi:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      - name: Package
        run: |
          pip install --upgrade build
          python -m build -s -w
      - name: Publish
        uses: pypa/gh-action-pypi-publish@release/v1
        with:
          user: __token__
          password: ${{ secrets.PYPI_TOKEN }}
