kaizen-agentic/.forgejo/workflows/publish-python-package.yml
tegwick f283b4a1ee
Some checks failed
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s
ci / test (push) Failing after 40s
ci: fix Forgejo Python workflows for node:20-bookworm runner
ubuntu-latest maps to docker://node:20-bookworm with python3 but no pip.
Install python3-pip via apt (reuse-surface pattern), use short-SHA archive
checkout, and --break-system-packages for PEP 668. Unblocks CUST-WP-0059 T05.
2026-07-18 18:05:46 +02:00

48 lines
1.5 KiB
YAML

# Publish kaizen-agentic to Forgejo org PyPI on version tags.
# Runner substrate: ubuntu-latest → node:20-bookworm — install pip via apt.
# Org secrets required: FORGEJO_PYPI_USER, FORGEJO_PYPI_TOKEN.
name: Publish Python package
on:
push:
tags:
- "v*"
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Fetch source archive
env:
REF: ${{ github.sha }}
run: |
set -eu
mkdir -p buildctx
SHORT="${REF:0:7}"
wget -qO /tmp/repo.tar.gz \
"https://forgejo.coulomb.social/${GITHUB_REPOSITORY}/archive/${SHORT}.tar.gz"
tar xzf /tmp/repo.tar.gz -C buildctx --strip-components=1
- name: Install Python tooling
run: |
set -eu
apt-get update -qq
apt-get install -y -qq python3 python3-pip python3-venv >/dev/null
python3 -m pip install --break-system-packages --upgrade pip build twine
- name: Build and validate distributions
working-directory: buildctx
run: |
python3 -m build
python3 -m twine check dist/*
- name: Upload to Forgejo PyPI
working-directory: buildctx
env:
TWINE_USERNAME: ${{ secrets.FORGEJO_PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.FORGEJO_PYPI_TOKEN }}
run: >-
python3 -m twine upload
--repository-url https://forgejo.coulomb.social/api/packages/coulomb/pypi
dist/*