Skip to content

Commit 76d20c8

Browse files
ci(node): Use npm install on release branches (#3018)
On release branches, we cannot `npm ci` because the platform specific dependencies are not released to npm yet.
1 parent 5dfcdb7 commit 76d20c8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/test_node.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,17 @@ jobs:
4848
with:
4949
node-version-file: package.json
5050

51-
- name: Install dependencies
51+
- name: Install dependencies via npm ci
52+
if: ${{ !inputs.triggered-by-release }}
5253
run: npm ci --ignore-scripts
5354

55+
# For pushes to the release branch, we need to install the dependencies via `npm install`
56+
# because the `package-lock.json` is not updated with the new versions of the optional
57+
# dependencies yet. We also must skip the fallback download via --ignore-scripts.
58+
- name: Install dependencies via npm install (for pushes to release branch)
59+
if: ${{ inputs.triggered-by-release }}
60+
run: npm install --omit=optional --ignore-scripts
61+
5462
- name: Build
5563
run: npm run build
5664

0 commit comments

Comments
 (0)