Skip to content

Latest commit

 

History

History
44 lines (25 loc) · 1.52 KB

File metadata and controls

44 lines (25 loc) · 1.52 KB

setup-nodejs-context

Conditionally installs a specific NodeJS version, pnpm, as well as the dependencies listed in package.json.

Example

steps:
  - uses: actions/checkout@v4

  - uses: giancosta86/aurora-github/actions/setup-nodejs-context@v7

Please, note: this action is automatically run by verify-npm-package and publish-npm-package.

How it works

  1. If a .nvmrc file exists, install NodeJS and pnpm; besides, if a .pnpmver file also exists, it must contain the required pnpm version - otherwise, the latest one will be requested.

  2. If a package.json file exists, install the dependencies, with the --frozen-lockfile flag enabled only if the pnpm-lock.yaml file is present.

Requirements

  • if the .nvmrc file exists, it must contain the NodeJS version, as expected by nvm.

  • if the pnpm-lock.yaml file exists, it must be up-to-date.

Inputs 📥

Name Type Description Default value
project-directory string Directory containing the project files .

Further references