name: Generate and Upload Icons

on:
  push:
    branches: [ main ]
  workflow_dispatch: {}

jobs:
  icons:
    runs-on: ubuntu-latest
    name: Generate icons and upload
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '18'
      - name: Install deps
        run: npm ci
      - name: Generate icons
        run: |
          npm run icons:gen || true
      - name: Upload icons
        uses: actions/upload-artifact@v4
        with:
          name: icons
          path: assets/
