oterm/.github/workflows/build-publish.yml
Yiorgis Gozadinos 3271eb32b7
Restrict publish workflow to release events
Remove the workflow_dispatch trigger so the only path to PyPI is a
published GitHub release.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 13:07:33 +03:00

21 lines
562 B
YAML

name: Build & publish to pypi
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build package
run: uv build
- name: Publish package
run: uvx twine upload -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} dist/* --non-interactive --skip-existing