mirror of
https://github.com/coder/code-server.git
synced 2026-05-05 03:55:18 +02:00
Set Node version in a single place (#6534)
This should make it much easier to update. Also use 18.15.0 specifically since that is what VS Code ships with. Additionally, it fixes the post-install script being skipped due to a Yarn v1 bug that happens when Yarn installs node-gyp, which it does because 18.18 onward stopped bundling node-gyp.
This commit is contained in:
18
.github/workflows/release.yaml
vendored
18
.github/workflows/release.yaml
vendored
@@ -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: |
|
||||
@@ -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
|
||||
@@ -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: |
|
||||
@@ -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
|
||||
@@ -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: |
|
||||
|
||||
Reference in New Issue
Block a user