Skip to content

Commit 6506605

Browse files
authored
Merge pull request #590 from per1234/engines_node
Use `engines.node` as source of version data for "actions/setup-node" action
2 parents 7b07ace + e2c148b commit 6506605

32 files changed

+136
-141
lines changed

.github/workflows/check-clang-format.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Check ClangFormat Configuration
22

3-
env:
4-
# See: https://github.com/actions/setup-node/#readme
5-
NODE_VERSION: 16.x
6-
73
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
84
on:
95
push:
@@ -48,7 +44,7 @@ jobs:
4844
- name: Setup Node.js
4945
uses: actions/setup-node@v4
5046
with:
51-
node-version: ${{ env.NODE_VERSION }}
47+
node-version-file: package.json
5248

5349
- name: Install Task
5450
uses: arduino/setup-task@v2
@@ -229,7 +225,7 @@ jobs:
229225
- name: Setup Node.js
230226
uses: actions/setup-node@v4
231227
with:
232-
node-version: ${{ env.NODE_VERSION }}
228+
node-version-file: package.json
233229

234230
- name: Install Task
235231
uses: arduino/setup-task@v2

.github/workflows/check-eslint.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Check ESLint Configuration
22

3-
env:
4-
# See: https://github.com/actions/setup-node/#readme
5-
NODE_VERSION: 16.x
6-
73
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
84
on:
95
push:
@@ -38,7 +34,7 @@ jobs:
3834
- name: Setup Node.js
3935
uses: actions/setup-node@v4
4036
with:
41-
node-version: ${{ env.NODE_VERSION }}
37+
node-version-file: package.json
4238

4339
- name: Install Task
4440
uses: arduino/setup-task@v2

.github/workflows/check-javascript-task.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-javascript-task.md
22
name: Check JavaScript
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -68,7 +64,7 @@ jobs:
6864
- name: Setup Node.js
6965
uses: actions/setup-node@v4
7066
with:
71-
node-version: ${{ env.NODE_VERSION }}
67+
node-version-file: package.json
7268

7369
- name: Install Task
7470
uses: arduino/setup-task@v2

.github/workflows/check-markdown-task.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-markdown-task.md
22
name: Check Markdown
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -77,7 +73,7 @@ jobs:
7773
- name: Setup Node.js
7874
uses: actions/setup-node@v4
7975
with:
80-
node-version: ${{ env.NODE_VERSION }}
76+
node-version-file: package.json
8177

8278
- name: Initialize markdownlint-cli problem matcher
8379
uses: xt0rted/markdownlint-problem-matcher@v3
@@ -105,7 +101,7 @@ jobs:
105101
- name: Setup Node.js
106102
uses: actions/setup-node@v4
107103
with:
108-
node-version: ${{ env.NODE_VERSION }}
104+
node-version-file: package.json
109105

110106
- name: Install Task
111107
uses: arduino/setup-task@v2

.github/workflows/check-npm-task.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-npm-task.md
22
name: Check npm
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -73,7 +69,7 @@ jobs:
7369
- name: Setup Node.js
7470
uses: actions/setup-node@v4
7571
with:
76-
node-version: ${{ env.NODE_VERSION }}
72+
node-version-file: package.json
7773

7874
- name: Install Task
7975
uses: arduino/setup-task@v2
@@ -106,7 +102,7 @@ jobs:
106102
- name: Setup Node.js
107103
uses: actions/setup-node@v4
108104
with:
109-
node-version: ${{ env.NODE_VERSION }}
105+
node-version-file: "${{ matrix.project.path }}/package.json"
110106

111107
- name: Install Task
112108
uses: arduino/setup-task@v2

.github/workflows/check-prettier-formatting-task.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-prettier-formatting-task.md
22
name: Check Prettier Formatting
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -245,7 +241,7 @@ jobs:
245241
- name: Setup Node.js
246242
uses: actions/setup-node@v4
247243
with:
248-
node-version: ${{ env.NODE_VERSION }}
244+
node-version-file: package.json
249245

250246
- name: Install Task
251247
uses: arduino/setup-task@v2

.github/workflows/check-taskfiles.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-taskfiles.md
22
name: Check Taskfiles
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
create:
@@ -74,7 +70,7 @@ jobs:
7470
- name: Setup Node.js
7571
uses: actions/setup-node@v4
7672
with:
77-
node-version: ${{ env.NODE_VERSION }}
73+
node-version-file: package.json
7874

7975
- name: Download JSON schema for Taskfiles
8076
id: download-schema

.github/workflows/check-workflows-task.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-workflows-task.md
22
name: Check Workflows
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
84
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
95
on:
106
push:
@@ -36,7 +32,7 @@ jobs:
3632
- name: Setup Node.js
3733
uses: actions/setup-node@v4
3834
with:
39-
node-version: ${{ env.NODE_VERSION }}
35+
node-version-file: package.json
4036

4137
- name: Install Task
4238
uses: arduino/setup-task@v2

.github/workflows/sync-labels-npm.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels-npm.md
22
name: Sync Labels
33

4-
env:
5-
# See: https://github.com/actions/setup-node/#readme
6-
NODE_VERSION: 16.x
7-
CONFIGURATIONS_FOLDER: .github/label-configuration-files
8-
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
9-
104
# See: https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
115
on:
126
push:
@@ -27,6 +21,10 @@ on:
2721
workflow_dispatch:
2822
repository_dispatch:
2923

24+
env:
25+
CONFIGURATIONS_FOLDER: .github/label-configuration-files
26+
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
27+
3028
jobs:
3129
check:
3230
runs-on: ubuntu-latest
@@ -40,7 +38,7 @@ jobs:
4038
- name: Setup Node.js
4139
uses: actions/setup-node@v4
4240
with:
43-
node-version: ${{ env.NODE_VERSION }}
41+
node-version-file: package.json
4442

4543
- name: Download JSON schema for labels configuration file
4644
id: download-schema
@@ -136,7 +134,7 @@ jobs:
136134
- name: Setup Node.js
137135
uses: actions/setup-node@v4
138136
with:
139-
node-version: ${{ env.NODE_VERSION }}
137+
node-version-file: package.json
140138

141139
- name: Merge label configuration files
142140
run: |

docs/development.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
The following development tools must be available in your local environment:
88

99
- [**Node.js** / **npm**](https://nodejs.org/en/download/) - Node.js dependencies management tool
10-
- <!-- NODE_VERSION -->
11-
This project uses Node.js 16.x
10+
- The **Node.js** version in use is defined by the `engines.node` key of [`package.json`](../package.json).
1211
- [**Python**](https://wiki.python.org/moin/BeginnersGuide/Download)
1312
- <!-- PYTHON_VERSION -->
1413
This project uses Python 3.9.x

0 commit comments

Comments
 (0)