name: Lint

on:
  push:
    paths:
      - packages/i18n/**
      - locales/**
      - .github/workflows/locale.yml
  pull_request:
    paths:
      - packages/i18n/**
      - locales/**
      - .github/workflows/locale.yml
jobs:
  locale_verify:
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
      - uses: actions/checkout@v6.0.1
        with:
          fetch-depth: 0
          submodules: true
      - name: Setup pnpm
        uses: pnpm/action-setup@v4.2.0
      - uses: actions/setup-node@v6.1.0
        with:
          node-version-file: ".node-version"
          cache: "pnpm"
      - run: pnpm i --frozen-lockfile
      - run: pnpm --filter i18n build
      - name: Verify Locales
        working-directory: ./packages/i18n
        run: pnpm run verify
