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>
66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
# Forgejo Actions workflow for packages with build step
|
|
# Copy to: .forgejo/workflows/publish.yml
|
|
|
|
name: Build and Publish
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Test
|
|
run: pnpm test || true
|
|
|
|
publish:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
registry-url: 'http://forge.nasty.sh/api/packages/lilith/npm/'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
- name: Publish
|
|
run: pnpm publish --no-git-checks --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|