Skip to content

Commit

Permalink
Update node.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RaviAkshintala authored Oct 28, 2024
1 parent a35e5ca commit 003c239
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Install Node.js

on: [push, pull_request]
on:
push

jobs:
install-node:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
run: |
$default_version = "18" # Replace this with your desired Node.js version
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tj/n/master/bin/n" -OutFile "$env:USERPROFILE\n"
bash "$env:USERPROFILE\n" $default_version
- name: Setup Node.js 18 using n (if necessary)
shell: pwsh
run: |
$defaultVersion = "18"
Invoke-WebRequest -Url "https://raw.githubusercontent.com/tj/n/master/bin/n" -OutFile "$HOME\n"
& "$HOME\n" $defaultVersion
- name: Verify Node.js installation
run: |
node -v
npm -v

0 comments on commit 003c239

Please sign in to comment.