- name: Setup Node
  uses: actions/setup-node@v6
  id: node
  with:
    node-version: {{#if jobIsMatrix}}$\{{ matrix.node-version }}{{else}}{{ last ciVersions }}{{/if}}
    check-latest: contains({{#if jobIsMatrix}}matrix.node-version{{else}}'{{ last ciVersions }}'{{/if}}, '.x')
    {{#if lockfile}}
    cache: npm
    {{/if}}
{{#if updateNpm}}
{{#if jobIsMatrix}}
- name: Install Latest npm
  if: $\{{ !startsWith(matrix.node-version, '22.') }}
  uses: ./.github/actions/install-latest-npm
  with:
    node: $\{{ steps.node.outputs.node-version }}
{{else}}
{{~#unless (eq (semverRangeMajor (last ciVersions)) 22)}}
- name: Install Latest npm
  uses: ./.github/actions/install-latest-npm
  with:
    node: $\{{ steps.node.outputs.node-version }}
{{/unless}}
{{/if}}
{{/if}}
