Skip to content

feat: add GitHub Actions workflow to automate PyPI publishing for the… #1

feat: add GitHub Actions workflow to automate PyPI publishing for the…

feat: add GitHub Actions workflow to automate PyPI publishing for the… #1

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/