name: Lint

on:
  push:
    paths:
      - locales/**
      - .github/workflows/locale.yml
  pull_request:
    paths:
      - locales/**
      - .github/workflows/locale.yml
jobs:
  locale_verify:
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
    - uses: actions/checkout@v4.2.2
      with:
        fetch-depth: 0
        submodules: true
    - name: Setup pnpm
      uses: pnpm/action-setup@v4.1.0
    - uses: actions/setup-node@v4.2.0
      with:
        node-version-file: '.node-version'
        cache: 'pnpm'
    - run: pnpm i --frozen-lockfile
    - run: cd locales && node verify.js
