name: Lucide font checks

on:
  pull_request:
    paths:
      - tools/build-font/**
      - pnpm-lock.yaml

jobs:
  lucide-font:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: pnpm/action-setup@v4
      - uses: actions/setup-node@v6
        with:
          cache: 'pnpm'
          node-version-file: 'package.json'

      - name: Install dependencies
        run: pnpm install --frozen-lockfile

      - name: Outline svg Icons
        run: pnpm build:outline-icons

      - name: Create font in ./lucide-font
        run: pnpm build:font

      - name: 'Upload to Artifacts'
        uses: actions/upload-artifact@v4
        with:
          name: lucide-font
          path: lucide-font
