anantacloud-actions/Setup Node.js Pro Environment
Setup a Node.js environment with smart defaults, auto-detection, caching, and cross-platform support.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| node-version | Version spec of Node.js (e.g., '18', '20.x', '>=18.0.0'). If not specified, will attempt to read from node-version-file. | no | — |
| node-version-file | File containing Node.js version (e.g., .nvmrc, .node-version, package.json, .tool-versions). Used when node-version is not specified. | no | — |
| architecture | Target architecture. Defaults to system architecture. | no | x64 |
| check-latest | Check for latest version matching the version spec | no | false |
| registry-url | Registry URL for npm/yarn/pnpm authentication | no | — |
| scope | Scope for registry authentication (e.g., @my-org) | no | — |
| token | Token for downloading Node.js or registry authentication. Defaults to github.token. | no | — |
| cache | Package manager to cache (npm | yarn | pnpm). Omit to auto-detect. | no | — |
| cache-dependency-path | Path(s) to dependency files for caching (supports wildcards) | no | — |
| mirror | Alternative mirror URL for Node.js binaries | no | — |
| mirror-token | Authorization token for mirror downloads | no | — |
| install | Install dependencies automatically | no | true |
| debug | Enable debug logs | no | false |
Outputs
| name | description |
|---|---|
| node-version | Resolved and installed Node.js version |
| cache-hit | Whether the dependency cache was hit (true/false) |
| npm-version | Resolved npm version |
| yarn-version | Resolved yarn version (if applicable) |
| pnpm-version | Resolved pnpm version (if applicable) |