From cdef11965e32afa1df14f2d7a4e19340409c9d72 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 17 Jul 2024 16:01:38 -0400 Subject: [PATCH] chore: replace nvmrc with tool-versions and update workflow Signed-off-by: Rui Chen --- .github/workflows/main.yml | 18 ++++++++++++------ .nvmrc | 1 - .tool-versions | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 .nvmrc create mode 100644 .tool-versions diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 656167a..29c5b71 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,14 +1,20 @@ -name: Main +name: main -on: [pull_request, push] +on: + push: + pull_request: jobs: build: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - # https://github.com/actions/checkout - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version-file: ".tool-versions" + cache: "npm" + - name: Install run: npm ci - name: Build diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 48b14e6..0000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -20.14.0 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..72c81fc --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 20.15.1