name: release

on:
  push:
    tags:
      - v*

jobs:

  upload:
    runs-on: ubuntu-latest
    permissions:
      id-token: write

    steps:
    - uses: actions/checkout@v3

    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: '3.11'

    - name: Install build
      run: pip install build

    - name: Create build
      run: python -m build

    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
