From 999034977350695e4c09fbf12446e900743f81db Mon Sep 17 00:00:00 2001 From: Keiichiro Amemiya Date: Wed, 25 Dec 2024 16:17:25 +0100 Subject: [PATCH] feat: update node version to 18/20/22 (#98) --- .github/workflows/ci.yml | 20 ++++++++++++++------ .github/workflows/release.yml | 2 +- package.json | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61d75ec..181ffdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,22 +2,30 @@ name: CI on: push: + branches: + - main pull_request: + branches: + - main jobs: test: runs-on: ubuntu-latest + strategy: + matrix: + node-version: + - '18' + - '20' + - '22' steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: ${{ matrix.node-version }} - run: npm i -g bower - run: npm ci - run: npm run static - run: npm test - uses: codecov/codecov-action@v3 + if: matrix.node-version == '22' - run: npm run build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09fd61c..337713e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: release-please on: push: branches: - - master + - main permissions: contents: write diff --git a/package.json b/package.json index 018f2d6..9ebb073 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,6 @@ "typescript": "4.2.3" }, "engines": { - "node": ">=8" + "node": "^18.12.0 || ^20.9.0 || ^22.11.0" } }