Sets up a specific NodeJS version and installs pnpm as well as the dependencies listed in package.json; any of these steps can be skipped by disabling the related flag.
steps:
- uses: actions/checkout@v4
- uses: giancosta86/aurora-github/actions/setup-nodejs-context@v5
Please, note: this action is automatically run by verify-npm-package and publish-npm-package.
The project directory must contain:
-
the
.nvmrc
file, containing the expected NodeJS version, as expected by nvm - ifsetup-nodejs
is set to true -
the package.json descriptor, if
install-dependencies
is set to true -
an updated
pnpm-lock.yaml
file, if bothinstall-dependencies
andfrozen-lockfile
are enabled
Name | Type | Description | Default value |
---|---|---|---|
setup-nodejs |
boolean | Set up the requested NodeJS version | true |
install-pnpm |
boolean | Install the requested pnpm version | true |
install-dependencies |
boolean | Install the dependencies for the current package | true |
pnpm-version |
string | The version of pnpm to use | 9 |
registry-url |
string | The URL of the npm registry | Official npm registry |
frozen-lockfile |
boolean | Fail if "pnpm-lock.yaml" is missing or outdated | true |
project-directory |
string | The directory containing package.json |
. |
shell |
string | The shell used to run commands | bash |