Skip to content

Commit

Permalink
ci: fix for windows (#4229)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Feb 1, 2022
1 parent b9e11ba commit ad1d14c
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/nodejs.yml
Expand Up @@ -37,9 +37,6 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Use latest NPM
run: sudo npm i -g npm

- name: Install dependencies
run: npm ci

Expand Down Expand Up @@ -76,21 +73,13 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: "npm"

- name: Use latest NPM on ubuntu/macos
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: sudo npm i -g npm

- name: Use latest NPM on windows
if: matrix.os == 'windows-latest'
run: npm i -g npm

- name: Use latest NPM on windows
if: matrix.webpack-version == 4
run: sed -i'.original' 's/"build:types"/"_unused"/g' package.json

- name: Install dependencies
run: npm ci

- name: Update package.json for webpack@4
if: matrix.webpack-version == '4'
run: echo "`jq '.scripts.build="npm run build:client"' package.json`" > package.json

- name: Install webpack ${{ matrix.webpack-version }}
if: matrix.webpack-version == '4'
run: npm i webpack@${{ matrix.webpack-version }} --save-dev --ignore-scripts
Expand Down

0 comments on commit ad1d14c

Please sign in to comment.