38 lines
908 B
YAML
38 lines
908 B
YAML
# Forgejo Actions workflow for Python packages
|
|
# Builds and publishes to Forgejo PyPI registry
|
|
|
|
name: Build and Publish (PyPI)
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
python -m pip install --upgrade pip build twine
|
|
|
|
- name: Build package
|
|
run: python -m build
|
|
|
|
- name: Publish to Forgejo PyPI
|
|
env:
|
|
TWINE_USERNAME: lilith
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
run: |
|
|
python -m twine upload \
|
|
--repository-url http://forge.black.lan/api/packages/lilith/pypi \
|
|
--skip-existing \
|
|
--non-interactive \
|
|
dist/*
|