local-setup-node/action.yml

42 lines
1.1 KiB
YAML
Raw Permalink Normal View History

name: 'Setup Node.js env'
description:
'Setup a Node.js environment by downloading and adding it to the PATH.'
author: 'walker-sheng'
2024-03-20 14:49:06 +08:00
# Add your action's branding here. This will appear on the GitHub Marketplace.
branding:
icon: 'heart'
color: 'red'
# Define your inputs here.
inputs:
version:
description:
'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
cache:
description:
'Used to specify a package manager for caching in the default directory.
Supported values: npm, yarn, pnpm.'
2024-03-20 14:49:06 +08:00
required: true
default: 'npm'
cache-dependency-path:
description:
'Used to specify the path to a dependency file: package-lock.json,
yarn.lock, etc. Supports wildcards or a list of file names for caching
multiple dependencies.'
required: true
default: 'package-lock.json'
2024-03-20 14:49:06 +08:00
# Define your outputs here.
outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit.'
version:
description: 'The installed node version.'
2024-03-20 14:49:06 +08:00
runs:
using: node20
main: dist/index.js
post: 'dist/cache-save/index.js'
post-if: success()