From e32ade959ba0f0f9f8d86a7bd1eceac82c5f26d5 Mon Sep 17 00:00:00 2001 From: Jared Hanson Date: Fri, 22 Nov 2024 16:16:08 -0800 Subject: [PATCH] Update workflow. --- .github/workflows/node.js.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index ff5a4e0..4a3b627 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -79,6 +79,10 @@ jobs: - env: N_MAJOR: ${{steps.lockfile-version.outputs.version}} run: echo "lockfile - $N_MAJOR" + + - id: install-lockfile-v3 + run: npm ci + if: steps.lockfile-version.outputs.version >= 3 && steps.npm-version.outputs.major >= 7 - run: npm ci # The [`ci`][1] command was [introduced][2] with npm@5, and is intended to @@ -89,7 +93,7 @@ jobs: # [1]: https://docs.npmjs.com/cli/v10/commands/npm-ci # [2]: https://blog.npmjs.org/post/171556855892/introducing-npm-ci-for-faster-more-reliable #if: steps.npm-version.outputs.major >= 6 - if: steps.lockfile-version.outputs.version != null && steps.npm-version.outputs.major >= 5 + if: steps.lockfile-version.outputs.version != null && steps.npm-version.outputs.major >= 5 && steps.install-lockfile-v3.outcome == 'skipped' - run: npm install if: steps.lockfile-version.outputs.version == null || steps.npm-version.outputs.major < 5