A composite Action for setting up Node and PNPM.
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: setup node and pnpm
uses: dafnik/setup-node-pnpm@v3
# with:
# pnpm: 8
# node: 22
# node-file: ''
# cwd: '.'
# install: false
# install-ignore-scripts: false
Inputs | Default value | Description |
---|---|---|
pnpm |
9 |
PNPM version to install |
node |
22 |
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 version from node-file . |
cwd |
. |
Changes pnpm-lock.yaml lookup location and the work directory of "pnpm install" if enabled |
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 test
In order to release a new version of this action:
-
Locate the semantic version of the upcoming release (a draft is maintained by the
draft-release
workflow). -
Publish the draft release from the
main
branch with semantic version as the tag name, with the checkbox to publish to the GitHub Marketplace checked. ☑️ -
After publishing the release, the
release
workflow 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.