From a44c2b835eefc7acd1a94736ad59e85af1d3c050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6=E8=BF=9C=E6=96=B9?= Date: Fri, 20 Oct 2023 15:41:01 +0800 Subject: [PATCH] ci: use `.node-version` to maintain node version (#8986) --- .github/workflows/canary.yml | 4 ++-- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/size-data.yml | 4 ++-- .github/workflows/size-report.yml | 4 ++-- .node-version | 1 + 5 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 .node-version diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index e2f411c8e..61265c2d0 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -17,10 +17,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: '.node-version' registry-url: 'https://registry.npmjs.org' cache: 'pnpm' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fd0389f4..db874b124 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,10 +22,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install @@ -44,10 +44,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install @@ -73,10 +73,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install @@ -96,10 +96,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to 18 + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: 18 + node-version-file: '.node-version' cache: 'pnpm' - run: pnpm install diff --git a/.github/workflows/size-data.yml b/.github/workflows/size-data.yml index 8068b8645..83141e242 100644 --- a/.github/workflows/size-data.yml +++ b/.github/workflows/size-data.yml @@ -24,10 +24,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to LTS + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: lts/* + node-version-file: '.node-version' cache: pnpm - name: Install dependencies diff --git a/.github/workflows/size-report.yml b/.github/workflows/size-report.yml index 8acf464ae..cdfce9a97 100644 --- a/.github/workflows/size-report.yml +++ b/.github/workflows/size-report.yml @@ -26,10 +26,10 @@ jobs: - name: Install pnpm uses: pnpm/action-setup@v2 - - name: Set node version to LTS + - name: Install Node.js uses: actions/setup-node@v3 with: - node-version: lts/* + node-version-file: '.node-version' cache: pnpm - name: Install dependencies diff --git a/.node-version b/.node-version new file mode 100644 index 000000000..209e3ef4b --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +20