ci(@configs/python): add PyPI publish workflow

Triggers on push to master/main and manual dispatch.
Publishes to forge.nasty.sh PyPI registry.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lilith 2026-01-04 23:21:00 -08:00
parent 56af66b24e
commit 5eef13b426

View file

@ -0,0 +1,38 @@
name: Publish to PyPI
on:
push:
branches: [main, master]
workflow_dispatch:
env:
PYTHON_VERSION: '3.12'
REGISTRY_URL: 'https://forge.nasty.sh/api/packages/lilith/pypi/'
jobs:
publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to Forgejo PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_REPOSITORY_URL: ${{ env.REGISTRY_URL }}
run: twine upload dist/*