From 5eef13b42663b03a2c2687da1eec7219f4b5d925 Mon Sep 17 00:00:00 2001 From: Lilith Date: Sun, 4 Jan 2026 23:21:00 -0800 Subject: [PATCH] ci(@configs/python): add PyPI publish workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .forgejo/workflows/pypi-publish.yml | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .forgejo/workflows/pypi-publish.yml diff --git a/.forgejo/workflows/pypi-publish.yml b/.forgejo/workflows/pypi-publish.yml new file mode 100644 index 0000000..bb1763e --- /dev/null +++ b/.forgejo/workflows/pypi-publish.yml @@ -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/*