2026-01-11 05:56:45 -08:00
|
|
|
# Forgejo Actions workflow with separate CI and publish jobs
|
|
|
|
|
# For high-impact packages that need thorough validation
|
|
|
|
|
|
|
|
|
|
name: CI and Publish
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches: [main, master]
|
|
|
|
|
pull_request:
|
|
|
|
|
branches: [main, master]
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
ci:
|
|
|
|
|
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: Lint
|
|
|
|
|
run: pnpm lint || true
|
|
|
|
|
|
|
|
|
|
- name: Type check
|
|
|
|
|
run: pnpm typecheck || true
|
|
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
|
run: pnpm build
|
|
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
|
run: pnpm test || true
|
|
|
|
|
|
|
|
|
|
publish:
|
|
|
|
|
needs: ci
|
|
|
|
|
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'
|
2026-06-10 21:07:42 -07:00
|
|
|
registry-url: 'http://forge.black.lan/api/packages/lilith/npm/'
|
2026-01-11 05:56:45 -08:00
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
env:
|
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
|
run: pnpm publish --no-git-checks
|