# CI for @punktfunk/plugin-rom-manager (Gitea Actions). Installs resolve `@punktfunk/*` and `@unom/*` # (the SPA's design system) from the Gitea npm registry via the bunfig scope maps; `effect` comes from # npm. The GITEA_NPM_TOKEN secret authenticates registry reads. Publish runs on a `v*` tag. name: CI on: push: branches: [main] tags: ["v*"] pull_request: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Registry auth run: echo "//git.unom.io/api/packages/unom/npm/:_authToken=${{ secrets.GITEA_NPM_TOKEN }}" > ~/.npmrc - name: Install run: bun install --frozen-lockfile - name: Lint & format run: bunx biome check - name: Typecheck (backend) run: bunx tsc --noEmit - name: Test (engine) run: bun test - name: Build backend + SPA run: bun run build:all - name: Typecheck (UI) working-directory: ui run: bunx tsc --noEmit - name: Sanity — plugin default export is a valid PluginDef run: | bun -e 'import p from "./dist/index.js"; const d = p.default; if (d?.name !== "rom-manager" || typeof d?.main !== "function") { console.error("bad default export", d); process.exit(1); } console.log("ok:", d.name)' publish: needs: build if: startsWith(github.ref, 'refs/tags/v') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 with: bun-version: latest - name: Registry auth run: echo "//git.unom.io/api/packages/unom/npm/:_authToken=${{ secrets.GITEA_NPM_TOKEN }}" > ~/.npmrc - name: Install run: bun install --frozen-lockfile - name: Build (backend + SPA) run: bun run build:all - name: Publish to the Gitea npm registry run: npm publish --registry https://git.unom.io/api/packages/unom/npm/