@@ -2,6 +2,11 @@ name: Test Node
22
33on :
44 workflow_call :
5+ inputs :
6+ triggered-by-release :
7+ type : boolean
8+ description : Whether the workflow was triggered by a release
9+ default : false
510 outputs :
611 matrix-result :
712 description : ' Matrix job result'
@@ -19,10 +24,15 @@ jobs:
1924 with :
2025 node-version-file : package.json
2126
22- # We need to skip the fallback download because downloading will fail on release branches because the new version isn't available yet.
23- # We have to use npm here because yarn fails on the non-existing existing optionalDependency version:
24- # https://github.com/yarnpkg/berry/issues/2425#issuecomment-1627807326
25- - run : SENTRYCLI_SKIP_DOWNLOAD=1 npm ci
27+ - name : Install dependencies
28+ run : |
29+ if [ ${{ inputs.triggered-by-release}} = true ]; then
30+ # On release, we need to run `npm install`, as package-lock.json is not updated for
31+ # the new version yet. We also must skip the fallback download via --ignore-scripts.
32+ npm install --omit=optional --ignore-scripts
33+ else
34+ npm ci
35+ fi
2636
2737 - run : npm run check:types
2838
@@ -43,10 +53,15 @@ jobs:
4353 with :
4454 node-version : ${{ matrix.node-version }}
4555
46- # We need to skip the fallback download because downloading will fail on release branches because the new version isn't available yet.
47- # We have to use npm here because yarn fails on the non-existing existing optionalDependency version:
48- # https://github.com/yarnpkg/berry/issues/2425#issuecomment-1627807326
49- - run : SENTRYCLI_SKIP_DOWNLOAD=1 npm ci
56+ - name : Install dependencies
57+ run : |
58+ if [ ${{ inputs.triggered-by-release}} = true ]; then
59+ # On release, we need to run `npm install`, as package-lock.json is not updated for
60+ # the new version yet. We also must skip the fallback download via --ignore-scripts.
61+ npm install --omit=optional --ignore-scripts
62+ else
63+ npm ci
64+ fi
5065
5166 # older node versions need an older nft
5267 - run : SENTRYCLI_SKIP_DOWNLOAD=1 npm install @vercel/nft@0.22.1
0 commit comments