diff --git a/.github/workflows/build-plugin-deb-package.yml b/.github/workflows/build-plugin-deb-package.yml index 8c6684d..a18564a 100644 --- a/.github/workflows/build-plugin-deb-package.yml +++ b/.github/workflows/build-plugin-deb-package.yml @@ -34,7 +34,9 @@ jobs: - name: Set up Node.js run: | - curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash - + NODE_MAJOR=$(tr -d 'v[:space:]' < .nvmrc | cut -d. -f1) + [[ "$NODE_MAJOR" =~ ^[0-9]+$ ]] || { echo "::error::.nvmrc must hold a Node major version, got '$NODE_MAJOR'"; exit 1; } + curl -fsSL "https://deb.nodesource.com/setup_${NODE_MAJOR}.x" | sudo -E bash - sudo apt-get install -y nodejs - name: Verify Node.js installation diff --git a/.github/workflows/publish-tag.yml b/.github/workflows/publish-tag.yml index 6c91c1f..440f432 100644 --- a/.github/workflows/publish-tag.yml +++ b/.github/workflows/publish-tag.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v3 with: - node-version: '24' + node-version-file: '.nvmrc' - name: Get triggering user's email run: | diff --git a/.github/workflows/ts-code-compilation.yml b/.github/workflows/ts-code-compilation.yml index 3d917f4..8dbe1d4 100644 --- a/.github/workflows/ts-code-compilation.yml +++ b/.github/workflows/ts-code-compilation.yml @@ -14,7 +14,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 24.x + node-version-file: '.nvmrc' - name: run npm install run: npm install - name: typescript code compilation diff --git a/.github/workflows/ts-code-validation.yml b/.github/workflows/ts-code-validation.yml index 7dbff82..3afd065 100644 --- a/.github/workflows/ts-code-validation.yml +++ b/.github/workflows/ts-code-validation.yml @@ -15,7 +15,7 @@ jobs: - name: install node uses: actions/setup-node@v4 with: - node-version: 24.x + node-version-file: '.nvmrc' - name: run npm install run: npm install - name: typescript code validation with eslint diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..6f4247a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +26