fix(ci): set NODE_AUTH_TOKEN so the publish can authenticate #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - run: bun install --frozen-lockfile | |
| - name: Types and Svelte check | |
| run: bun run check | |
| # `svelte-package` + publint. publint is the guard that matters: it | |
| # validates the exports map against what consumers actually resolve, so | |
| # a broken subpath or a missing `svelte` condition fails here rather | |
| # than in engine or rgs after a release. | |
| - name: Build package | |
| run: bun run build | |
| - name: Build gallery | |
| run: bun run build:gallery | |
| # The brand's rules, enforced. These are the two failure modes that | |
| # actually happened in the products: raw hex literals and Tailwind's | |
| # stock palette standing in for the missing status colours. A design | |
| # system that lets them through has no way to hold the line. | |
| - name: No off-palette colours | |
| run: | | |
| set -uo pipefail | |
| fail=0 | |
| hits=$(grep -rnE '#[0-9a-fA-F]{3,8}\b' src/lib/components src/lib/utils.ts 2>/dev/null \ | |
| | grep -vE '^\S+:[0-9]+:\s*(//|\*|/\*)' || true) | |
| if [ -n "$hits" ]; then | |
| echo "::error::raw hex literals in component source — use a token from styles/tokens.css" | |
| echo "$hits" | |
| fail=1 | |
| fi | |
| palette='red|green|blue|yellow|orange|amber|emerald|lime|teal|cyan|sky|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone' | |
| hits=$(grep -rnE "\b(bg|text|border|ring|fill|stroke|from|to|via|decoration|outline|caret|placeholder)-($palette)-[0-9]{2,3}\b" src/lib/components 2>/dev/null \ | |
| | grep -vE '^\S+:[0-9]+:\s*(//|\*|/\*)' || true) | |
| if [ -n "$hits" ]; then | |
| echo "::error::Tailwind stock palette in component source — the brand has three colours and a grey ramp. There is no status palette; do not substitute one." | |
| echo "$hits" | |
| fail=1 | |
| fi | |
| hits=$(grep -rnE 'originals-orange|sportsbook-blue' src/lib 2>/dev/null \ | |
| | grep -vE '^\S+:[0-9]+:\s*(//|\*|/\*)' || true) | |
| if [ -n "$hits" ]; then | |
| echo "::error::retired sub-brand colour referenced — Originals Orange and Sportsbook Blue have no owner and are not available" | |
| echo "$hits" | |
| fail=1 | |
| fi | |
| [ "$fail" -eq 0 ] && echo "palette clean" | |
| exit "$fail" | |
| # "No emoji. Anywhere. Not in the brand material, not in product UI, | |
| # not in copy." The only sanctioned non-alphanumeric glyphs are × and ✱. | |
| - name: No emoji | |
| run: | | |
| set -uo pipefail | |
| hits=$(grep -rnP '[\x{1F300}-\x{1FAFF}\x{2600}-\x{27BF}\x{FE0F}\x{1F000}-\x{1F0FF}]' src 2>/dev/null || true) | |
| if [ -n "$hits" ]; then | |
| echo "::error::emoji found — the brand permits none, anywhere" | |
| echo "$hits" | |
| exit 1 | |
| fi | |
| echo "no emoji" |