name: Upload Python Package

on:
  release:
    types: [published]

jobs:
  pypi-publish:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
    steps:
    - uses: actions/checkout@v5
    - name: Set up Python
      uses: actions/setup-python@v6
      with:
        python-version: '3.x'
    - name: Install Dependencies
      run: |
        python -m pip install -U build
    - name: Build Wheel
      run: |
        python -m build --wheel
    - name: Publish package distributions to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
