Conditionally installs a specific NodeJS version, pnpm, as well as the dependencies listed in package.json.
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.
-
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. -
If a
package.json
file exists, install the dependencies, with the--frozen-lockfile
flag enabled only if thepnpm-lock.yaml
file is present.
-
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.
Name | Type | Description | Default value |
---|---|---|---|
project-directory |
string | Directory containing the project files | . |