# publish.yml
name: "Publish"
on:
  release:
    types: ["published"]

jobs:
  pypi:
    name: Publish to PyPI
    runs-on: ubuntu-latest
    # Environment and permissions trusted publishing.
    environment:
      # Create this environment in the GitHub repository under Settings -> Environments
      name: release
    permissions:
      id-token: write
    steps:
      - uses: actions/checkout@v4
      - uses: astral-sh/setup-uv@v3
      - run: uv build
      - run: uv publish --trusted-publishing always
