Skip to content

Commit 777cae9

Browse files
feat: add GitHub Actions workflow to automate PyPI publishing for the server module
1 parent 5f8e4b3 commit 777cae9

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Auto Publish GuGa PyPI (Server Only)
2+
3+
on:
4+
push:
5+
branches:
6+
- latest
7+
paths:
8+
- 'server/**'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
id-token: write # IMPORTANT: required for trusted publishing
14+
attestations: write # REQUIRED: Enables digital attestations (PEP 740)
15+
16+
jobs:
17+
build-and-publish-pypi:
18+
name: Build and publish Python 🐍 distribution 📦 to PyPI
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout Source Code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.11"
31+
32+
- name: Build generic package distributions
33+
run: |
34+
cd server
35+
python -m pip install build
36+
python -m build
37+
38+
- name: Publish package distribution to PyPI
39+
uses: pypa/gh-action-pypi-publish@release/v1
40+
with:
41+
packages-dir: server/dist/

0 commit comments

Comments
 (0)