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:
parent
56af66b24e
commit
5eef13b426
1 changed files with 38 additions and 0 deletions
38
.forgejo/workflows/pypi-publish.yml
Normal file
38
.forgejo/workflows/pypi-publish.yml
Normal 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/*
|
||||
Loading…
Add table
Reference in a new issue