Update node.yml #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 using Chocolatey | |
run: | | |
choco install nodejs --version=18.0.0 -y | |
- name: Setup Node.js 18 using n (if necessary) | |
shell: pwsh | |
run: | | |
$defaultVersion = "18" | |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tj/n/master/bin/n" -OutFile "$HOME\n" | |
& "$HOME\n" $defaultVersion |