Skip to content

Commit ad1d14c

Browse files
authored
ci: fix for windows (#4229)
1 parent b9e11ba commit ad1d14c

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

.github/workflows/nodejs.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
node-version: ${{ matrix.node-version }}
3838
cache: "npm"
3939

40-
- name: Use latest NPM
41-
run: sudo npm i -g npm
42-
4340
- name: Install dependencies
4441
run: npm ci
4542

@@ -76,21 +73,13 @@ jobs:
7673
node-version: ${{ matrix.node-version }}
7774
cache: "npm"
7875

79-
- name: Use latest NPM on ubuntu/macos
80-
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
81-
run: sudo npm i -g npm
82-
83-
- name: Use latest NPM on windows
84-
if: matrix.os == 'windows-latest'
85-
run: npm i -g npm
86-
87-
- name: Use latest NPM on windows
88-
if: matrix.webpack-version == 4
89-
run: sed -i'.original' 's/"build:types"/"_unused"/g' package.json
90-
9176
- name: Install dependencies
9277
run: npm ci
9378

79+
- name: Update package.json for webpack@4
80+
if: matrix.webpack-version == '4'
81+
run: echo "`jq '.scripts.build="npm run build:client"' package.json`" > package.json
82+
9483
- name: Install webpack ${{ matrix.webpack-version }}
9584
if: matrix.webpack-version == '4'
9685
run: npm i webpack@${{ matrix.webpack-version }} --save-dev --ignore-scripts

0 commit comments

Comments
 (0)