From ad1d14c2bd173246cbcc6b29e013c8bcabd35c89 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Tue, 1 Feb 2022 19:21:55 +0530 Subject: [PATCH] ci: fix for windows (#4229) --- .github/workflows/nodejs.yml | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 22443f26a8..70a0215e35 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -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 @@ -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