diff --git a/.gitea/workflows/publish-pypi.yml b/.gitea/workflows/publish-pypi.yml new file mode 100644 index 0000000..5f131e0 --- /dev/null +++ b/.gitea/workflows/publish-pypi.yml @@ -0,0 +1,25 @@ +name: Publish to PyPI + +on: + release: + types: [published] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build and publish + env: + PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + python -m build + publish-pypi