feat: add GitHub Actions workflow to automate PyPI publishing for the… #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Publish GuGa PyPI (Server Only) | |
| on: | |
| push: | |
| branches: | |
| - latest | |
| paths: | |
| - 'server/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write # IMPORTANT: required for trusted publishing | |
| attestations: write # REQUIRED: Enables digital attestations (PEP 740) | |
| jobs: | |
| build-and-publish-pypi: | |
| name: Build and publish Python 🐍 distribution 📦 to PyPI | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Source Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Build generic package distributions | |
| run: | | |
| cd server | |
| python -m pip install build | |
| python -m build | |
| - name: Publish package distribution to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: server/dist/ |