Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Node version in a single place #6534

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
files: |
docs/**

- name: Install Node.js v18
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version
cache: "yarn"

- name: Install doctoc
Expand Down Expand Up @@ -115,11 +115,11 @@ jobs:
files_ignore: |
lib/vscode/**

- name: Install Node.js v18
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
Expand Down Expand Up @@ -170,11 +170,11 @@ jobs:
files_ignore: |
lib/vscode/**

- name: Install Node.js v18
- name: Install Node.js
if: steps.changed-files.outputs.any_changed == 'true'
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Fetch dependencies from cache
if: steps.changed-files.outputs.any_changed == 'true'
Expand Down Expand Up @@ -224,10 +224,10 @@ jobs:
- name: Patch Code
run: quilt push -a

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Fetch dependencies from cache
id: cache-node-modules
Expand Down Expand Up @@ -298,10 +298,10 @@ jobs:
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Fetch dependencies from cache
id: cache-node-modules
Expand Down Expand Up @@ -357,10 +357,10 @@ jobs:
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libkrb5-dev

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Fetch dependencies from cache
id: cache-node-modules
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- name: Checkout code-server
uses: actions/checkout@v4

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version
cache: "yarn"

- name: Download npm package from release artifacts
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18.15.0"
node-version-file: .node-version

- name: Install development tools
run: |
Expand Down Expand Up @@ -128,7 +128,6 @@ jobs:
PKG_CONFIG_PATH: ${{ format('/usr/lib/{0}/pkgconfig', matrix.prefix) }}
TARGET_ARCH: ${{ matrix.apt_arch }}
npm_config_arch: ${{ matrix.npm_arch }}
NODE_VERSION: v18.15.0
# Not building from source results in an x86_64 argon2, as if
# npm_config_arch is being ignored.
npm_config_build_from_source: true
Expand All @@ -137,10 +136,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18.15.0"
node-version-file: .node-version

- name: Install cross-compiler and system dependencies
run: |
Expand Down Expand Up @@ -174,8 +173,9 @@ jobs:

- name: Replace node with cross-compile equivalent
run: |
wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-${npm_config_arch}.tar.xz
tar -xf node-${NODE_VERSION}-linux-${npm_config_arch}.tar.xz node-${NODE_VERSION}-linux-${npm_config_arch}/bin/node --strip-components=2
node_version=$(node --version)
wget https://nodejs.org/dist/${node_version}/node-${node_version}-linux-${npm_config_arch}.tar.xz
tar -xf node-${node_version}-linux-${npm_config_arch}.tar.xz node-${node_version}-linux-${npm_config_arch}/bin/node --strip-components=2
mv ./node ./release-standalone/lib/node

# NOTE@jsjoeio - we do this so we can strip out the v
Expand Down Expand Up @@ -205,10 +205,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18.15.0"
node-version-file: .node-version

- name: Install nfpm
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
with:
fetch-depth: 0

- name: Install Node.js v18
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
node-version-file: .node-version

- name: Audit yarn for vulnerabilities
run: yarn audit
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
18.15.0