bitch-cli/templates/workflows/publish-pypi.yml
Lilith 7662f41158 feat(@cli/bitch-cli): add Forgejo workflow management commands
Add comprehensive workflow management to replace bash scripts:
- workflows audit: Audit workflow coverage across workspace
- workflows validate: Validate deployed workflows
- workflows rollout: Deploy workflow templates by phase/category
- Enhance ci command with --failed and --verbose flags

New utilities:
- workflow-audit.ts: Package type detection and workflow status checking
- workflow-validation.ts: YAML validation and metadata checking
- workflow-templates.ts: Template selection and deployment

New templates:
- publish-npm.yml: TypeScript packages with build
- publish-config.yml: Config-only packages
- publish-pypi.yml: Python packages
- ci-publish-separate.yml: High-impact packages with separate CI

Fixes:
- Filter node_modules from package discovery
- Handle packages without names gracefully

Replaces:
- scripts/forgejo/audit-workflows.sh
- scripts/forgejo/validate-workflows.sh
- scripts/forgejo/rollout-workflows.sh
- Enhances scripts/forgejo/ci-status.sh functionality

Version bumped: 1.1.0 → 1.2.0

Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
2026-01-11 05:56:45 -08:00

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 https://forge.nasty.sh/api/packages/lilith/pypi \
--skip-existing \
--non-interactive \
dist/*