-
Notifications
You must be signed in to change notification settings - Fork 80
/
install.yml
49 lines (42 loc) · 1.65 KB
/
install.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
description: |
Install custom versions of Node.js, and optionally NPM/Yarn, in any
execution environment (Docker/Linux, macOS, machine) that does not have
it preinstalled.
Recommendation: It is highly recommended to utilize an environment such as Docker with Node preinstalled.
parameters:
# node
node-version:
type: string
default: ''
description: >
Specify the full version tag to install. To install the latest version, set the version to `latest`.
If unspecified, the version listed in .nvmrc will be installed. If no .nvmrc file exists the active LTS version of Node.js will be installed by default.
For a full list of releases, see the following: https://nodejs.org/en/download/releases
node-install-dir:
type: string
default: /usr/local
description: >
Where should Node.js be installed?
# yarn
install-yarn:
type: boolean
default: false
description: Install Yarn?
yarn-version:
type: string
default: ''
description: >
Pick a version of Yarn to install (if no version is specified,
the latest stable version will be installed):
https://github.com/yarnpkg/yarn/releases
steps:
- run:
name: Install Node.js <<parameters.node-version>>
environment:
NODE_PARAM_VERSION: <<parameters.node-version>>
command: <<include(scripts/install-nvm.sh)>>
- when:
condition: <<parameters.install-yarn>>
steps:
- install-yarn:
version: <<parameters.yarn-version>>