From 0bd4c3f59927b1e8bca08183ca868dde7b5fcad7 Mon Sep 17 00:00:00 2001 From: Akirami <66513481+A-kirami@users.noreply.github.com> Date: Sun, 1 Dec 2024 13:27:03 +0800 Subject: [PATCH] feat(ci): Retrieve the Node.js version from package.json --- .github/workflows/build-terre.yml | 10 +++++----- .github/workflows/pr-check.yml | 10 +++++----- .github/workflows/release.yml | 10 +++++----- package.json | 4 +++- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-terre.yml b/.github/workflows/build-terre.yml index 6fb39ea8b..e004fd23a 100644 --- a/.github/workflows/build-terre.yml +++ b/.github/workflows/build-terre.yml @@ -15,7 +15,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -35,7 +35,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build Stage 1 run: | @@ -124,7 +124,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -144,7 +144,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash @@ -163,7 +163,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index f448feb89..346de460c 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -17,7 +17,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -37,7 +37,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build Stage 1 run: | @@ -126,7 +126,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -146,7 +146,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash @@ -165,7 +165,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2ba61540..ce859da99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -40,7 +40,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build Stage 1 run: | @@ -132,7 +132,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build env: @@ -154,7 +154,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash @@ -175,7 +175,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 18 + node-version-file: package.json cache: 'yarn' - name: Build shell: bash diff --git a/package.json b/package.json index c1123ef19..92746618d 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,11 @@ "**/electron/**" ] }, - "dependencies": {}, "devDependencies": { "concurrently": "^7.2.2", "iconv-lite": "^0.6.3" + }, + "engines": { + "node": "18" } }