-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
31 lines (28 loc) · 1008 Bytes
/
action.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
name: dead-simple-nodejs
branding:
icon: archive
color: green
description: Install fast & simply & with minimal dependencies
inputs:
NODE_VERSION:
description: nodejs version to install
required: true
NODE_DISTRO:
description: nodejs distro to install
default: linux-x64
required: true
runs:
using: composite
steps:
# https://github.com/nodejs/help/wiki/Installation
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
- name: Install NodeJS
shell: bash
run: |
sudo mkdir -p /usr/local/lib/nodejs
pushd /usr/local/lib/nodejs
echo "Downloading & Extracting NodeJS v${{ inputs.NODE_VERSION }} (${{ inputs.NODE_DISTRO }})"
curl -s https://nodejs.org/dist/v${{ inputs.NODE_VERSION }}/node-v${{ inputs.NODE_VERSION }}-${{ inputs.NODE_DISTRO }}.tar.xz | \
sudo tar -xJ --strip-components=1
popd
echo '/usr/local/lib/nodejs/bin' >> $GITHUB_PATH