From 538064589dcedec3ba5d68ac03056be7efdcb356 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Fri, 7 Mar 2025 01:18:29 +0900 Subject: [PATCH] ci: refer `.npmrc` to ensure using consistent node version (#3228) --- .github/workflows/ci.yml | 2 ++ .github/workflows/release.yml | 2 +- CONTRIBUTING.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d86349a1..0c1466fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,8 @@ jobs: # - https://github.com/nodejs/corepack/issues/612#issuecomment-2629496091 - run: npm i -g corepack@latest && corepack enable - uses: actions/setup-node@v4.2.0 + with: + node-version-file: .nvmrc - name: 📦 Install dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b99de717..b733190d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set node uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: .nvmrc - run: npx changelogithub env: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 51bdad69..781a53c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,7 +18,7 @@ To develop and test the Elk package: 1. Fork the Elk repository to your own GitHub account and then clone it to your local device. -2. Ensure using the latest Node.js (20.x). +2. Ensure using the LTS version of Node.js. If you have [nvm](https://github.com/nvm-sh/nvm), you can run `nvm i` to install the required version. 3. The package manager used to install and link dependencies must be [pnpm](https://pnpm.io/) v9. To use it you must first enable [Corepack](https://github.com/nodejs/corepack) by running `corepack enable`. (Note: on Linux in a standard Node 20+ environment, you should follow the instructions to install via Node's `corepack` rather than using the `curl` command)