3838 run : |
3939 git config --global core.autocrlf false
4040 git config --global core.eol lf
41+ shell : bash
4142 - name : Checkout repository
42- uses : actions/checkout@v3
43+ uses : actions/checkout@v4
4344 - name : Check if Node.js project and has package.json
4445 id : packagejson
4546 run : test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
@@ -50,14 +51,18 @@ jobs:
5051 id : lockversion
5152 - if : steps.packagejson.outputs.exists == 'true'
5253 name : Setup Node.js
53- uses : actions/setup-node@v3
54+ uses : actions/setup-node@v4
5455 with :
5556 node-version : " ${{ steps.lockversion.outputs.version }}"
56- cache : ' npm'
57- cache-dependency-path : ' **/package-lock.json'
57+ - if : steps.lockversion.outputs.version == '18' && matrix.os == 'windows-latest'
58+ name : Install npm cli 8
59+ shell : bash
60+ # npm cli 10 is buggy because of some cache issues
61+ run : npm install -g npm@8.19.4
5862 - if : steps.packagejson.outputs.exists == 'true'
5963 name : Install dependencies
60- run : npm install
64+ shell : bash
65+ run : npm ci
6166 - if : steps.packagejson.outputs.exists == 'true'
6267 name : Run test
6368 run : npm test --if-present
8186 git config --global core.autocrlf false
8287 git config --global core.eol lf
8388 - name : Checkout repository
84- uses : actions/checkout@v3
89+ uses : actions/checkout@v4
8590 - name : Check if Node.js project and has package.json
8691 id : packagejson
8792 run : test -e ./package.json && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
@@ -92,21 +97,13 @@ jobs:
9297 id : lockversion
9398 - if : steps.packagejson.outputs.exists == 'true'
9499 name : Setup Node.js
95- uses : actions/setup-node@v3
100+ uses : actions/setup-node@v4
96101 with :
97102 node-version : " ${{ steps.lockversion.outputs.version }}"
98- cache : ' npm'
99- cache-dependency-path : ' **/package-lock.json'
100103 - if : steps.packagejson.outputs.exists == 'true'
101104 name : Install dependencies
102- id : first-installation
105+ shell : bash
103106 run : npm ci
104- continue-on-error : true
105- - if : steps.first-installation.outcome != 'success' && steps.packagejson.outputs.exists == 'true'
106- name : Clear NPM cache and install deps again
107- run : |
108- npm cache clean --force
109- npm ci
110107 - if : steps.packagejson.outputs.exists == 'true'
111108 name : Add plugin for conventional commits for semantic-release
112109 run : npm install --save-dev conventional-changelog-conventionalcommits@5.0.0
@@ -131,4 +128,4 @@ jobs:
131128 fields : repo,action,workflow
132129 text : ' Release workflow failed in release job'
133130 env :
134- SLACK_WEBHOOK_URL : ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
131+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_CI_FAIL_NOTIFY }}
0 commit comments