name: yolink_

on:
  release:
    types: [published, prereleased]

jobs:
  build-and-publish:
    name: Builds and publishes releases to PyPI
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python 3.13
        uses: actions/setup-python@v5
        with:
          python-version: 3.13
      - name: Install build
        run: >-
          pip install build
      - name: Build
        run: >-
          python3 -m build
      - name: Publish release to PyPI
        uses: pypa/gh-action-pypi-publish@v1.5.0
        with:
          user: __token__
          password: ${{ secrets.PYPI_TOKEN }}
