A composite Action for setting up Node and PNPM.
jobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout your repository using gituses: actions/checkout@v4
- name: setup node and pnpmuses: dafnik/setup-node-pnpm@v4# with:# node: 24# node-file: ''# cwd: '.'# install: false# install-ignore-scripts: false| Inputs | Default value | Description |
|---|---|---|
pnpm | PNPM version to install (leave empty to read packageManager configuration of your package_file.) | |
package_file | package.json | File path to the package.json to read packageManager configuration (also supports package.yml). Works in conjunction with cwd input. |
node | 24 | Version Spec of the version to use in SemVer notation. It also emits such aliases as lts, latest, nightly and canary builds. Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node |
node-file | '' | File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions. If node and node-file are both provided the action will use the version from node-file. |
cwd | . | Changes pnpm-lock.yaml lookup location and the work directory of "pnpm install" if enabled |
package_file | package.json | File path to the package.json to read "packageManager" configuration (also supports package.yml). Works in conjunction with "cwd" input. |
install | false | Runs "pnpm install" in working directory |
install-ignore-scripts | false | Runs "pnpm install --ignore-scripts" in working directory. Enable "install" or "install-ignore-scripts" only once |
Furthermore, see action.yml
Local testing is done with act
Run the test workflow:
act -j testIn order to release a new version of this action:
Locate the semantic version of the upcoming release (a draft is maintained by the
draft-releaseworkflow).Publish the draft release from the
mainbranch with semantic version as the tag name, with the checkbox to publish to the GitHub Marketplace checked. ☑️After publishing the release, the
releaseworkflow will automatically run to create/update the corresponding the major version tag such asv0.⚠️ Environment approval is required. Check the Release workflow run list.
The scripts and documentation in this project are released under the MIT License.