Skip to content

Update node.yml

Update node.yml #4

Workflow file for this run

name: Install Node.js
on: [push, pull_request]
jobs:
install-node:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js 18
run: |
$defaultVersion = 18
$versionToInstall = Resolve-ChocoPackageVersion -PackageName "nodejs" -TargetVersion $defaultVersion
Install-ChocoPackage "nodejs" -ArgumentList "--version=$versionToInstall"
# Install default Node.js
default_version=$(get_toolset_value '.node.default')
curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n -o ~/n
bash ~/n $default_version
shell: pwsh