Skip to content

Commit

Permalink
Merge pull request #208 from eltonkl/node-v22
Browse files Browse the repository at this point in the history
Support Node.js v22
  • Loading branch information
uhop committed May 7, 2024
2 parents 60425d6 + 6907a9e commit e0ecad4
Show file tree
Hide file tree
Showing 12 changed files with 134 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/actions/linux-alpine-node-22/Dockerfile
@@ -0,0 +1,6 @@
FROM node:22-alpine

RUN apk add --no-cache python3 make gcc g++ linux-headers

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
7 changes: 7 additions & 0 deletions .github/actions/linux-alpine-node-22/action.yml
@@ -0,0 +1,7 @@
name: 'Create a binary artifact for Node 22 on Alpine Linux'
description: 'Create a binary artifact for Node 22 on Alpine Linux using musl'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-alpine-node-22/entrypoint.sh
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
6 changes: 6 additions & 0 deletions .github/actions/linux-arm64-node-22/Dockerfile
@@ -0,0 +1,6 @@
FROM --platform=linux/arm64 node:22-bullseye

RUN apt install python3 make gcc g++

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions .github/actions/linux-arm64-node-22/action.yml
@@ -0,0 +1,12 @@
name: 'Create a binary artifact for Node 22 on Linux on ARM64'
description: 'Create a binary artifact for Node 22 on Linux on ARM64 using node:22-bullseye'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '22'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-arm64-node-22/entrypoint.sh
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
6 changes: 6 additions & 0 deletions .github/actions/linux-node-22/Dockerfile
@@ -0,0 +1,6 @@
FROM node:22-bullseye

RUN apt install python3 make gcc g++

COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
12 changes: 12 additions & 0 deletions .github/actions/linux-node-22/action.yml
@@ -0,0 +1,12 @@
name: 'Create a binary artifact for Node 22 on Linux'
description: 'Create a binary artifact for Node 22 on Linux using node:22-bullseye'
inputs:
node-version:
description: 'Node.js version'
required: false
default: '22'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{inputs.node-version}}
10 changes: 10 additions & 0 deletions .github/actions/linux-node-22/entrypoint.sh
@@ -0,0 +1,10 @@
#!/bin/sh

set -e

export USERNAME=`whoami`
export DEVELOPMENT_SKIP_GETTING_ASSET=true
npm i
npm run build --if-present
npm test
npm run save-to-github
51 changes: 50 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
os: [macOS-latest, windows-latest]
node-version: [18, 20, 21]
node-version: [18, 20, 21, 22]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -96,6 +96,21 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-node-22:
name: Node.js 22 on Debian Bullseye
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install, test, and create artifact
uses: ./.github/actions/linux-node-22/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-alpine-node-18:
name: Node.js 18 on Alpine Linux
needs: create-release
Expand Down Expand Up @@ -141,6 +156,21 @@ jobs:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-alpine-node-22:
name: Node.js 22 on Alpine Linux
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install, test, and create artifact
uses: ./.github/actions/linux-alpine-node-22/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-arm64-node-18:
name: Node.js 18 on Debian Buster on ARM64
needs: create-release
Expand Down Expand Up @@ -197,3 +227,22 @@ jobs:
uses: ./.github/actions/linux-arm64-node-21/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

build-linux-arm64-node-22:
name: Node.js 22 on Debian Bullseye on ARM64
needs: create-release
runs-on: ubuntu-latest
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Install, test, and create artifact
uses: ./.github/actions/linux-arm64-node-22/
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
],
"dependencies": {
"install-artifact-from-github": "^1.3.5",
"nan": "^2.18.0",
"nan": "^2.19.0",
"node-gyp": "^10.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit e0ecad4

Please sign in to comment.