name: "Install"
description: "Sets up Node.js and runs install"

runs:
  using: composite
  steps:
    - name: Setup pnpm
      uses: pnpm/action-setup@v6
      with:
        run_install: false

    - name: Setup node
      uses: actions/setup-node@v7
      with:
        cache: pnpm
        node-version-file: ".nvmrc"
        cache-dependency-path: pnpm-lock.yaml
        registry-url: "https://registry.npmjs.org"

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

    - name: Setup Git User
      shell: bash
      run: |
        git config --global user.email "jrgarciadev@gmail.com"
        git config --global user.name "Junior Garcia"
