local-setup-node/action.yml
soul-walker 625cb7a64e 实现从官方下载并安装nodejs,并实现nodejs缓存
实现npm、yarn、pnpm等包管理的依赖包缓存
2024-03-20 20:36:03 +08:00

42 lines
1.1 KiB
YAML

name: 'Setup Node.js env'
description:
'Setup a Node.js environment by downloading and adding it to the PATH.'
author: 'walker-sheng'
# 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.'
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'
# Define your outputs here.
outputs:
cache-hit:
description: 'A boolean value to indicate if a cache was hit.'
version:
description: 'The installed node version.'
runs:
using: node20
main: dist/index.js
post: 'dist/cache-save/index.js'
post-if: success()