diff --git a/.github/actions/setup-node/action.yml b/.github/actions/setup-node/action.yml new file mode 100644 index 00000000..d046eeb9 --- /dev/null +++ b/.github/actions/setup-node/action.yml @@ -0,0 +1,9 @@ +name: 'Setup Node' +description: 'Set up GitHub Actions workflow with a specific version of node.js' + +runs: + using: 'composite' + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20 \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2f85b534..01d9db83 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 + - name: Setup Node + uses: "./.github/actions/setup-node" - run: yarn --frozen-lockfile - run: yarn build diff --git a/.github/workflows/jest.yaml b/.github/workflows/jest.yaml index 412b71f5..b57c10d7 100644 --- a/.github/workflows/jest.yaml +++ b/.github/workflows/jest.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 + - name: Setup Node + uses: "./.github/actions/setup-node" - run: yarn --frozen-lockfile - run: yarn test diff --git a/.github/workflows/markdownlint.yaml b/.github/workflows/markdownlint.yaml index 70d0dd05..5676b96a 100644 --- a/.github/workflows/markdownlint.yaml +++ b/.github/workflows/markdownlint.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 + - name: Setup Node + uses: "./.github/actions/setup-node" - run: yarn --frozen-lockfile - run: yarn markdownlint diff --git a/.github/workflows/prettier.yaml b/.github/workflows/prettier.yaml index 6cdfb64a..65c5eb4b 100644 --- a/.github/workflows/prettier.yaml +++ b/.github/workflows/prettier.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 + - name: Setup Node + uses: "./.github/actions/setup-node" - run: yarn --frozen-lockfile - run: yarn prettier diff --git a/.github/workflows/tsc.yaml b/.github/workflows/tsc.yaml index fb47ffd0..64abfc24 100644 --- a/.github/workflows/tsc.yaml +++ b/.github/workflows/tsc.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 + - name: Setup Node + uses: "./.github/actions/setup-node" - run: yarn --frozen-lockfile - run: yarn typecheck diff --git a/package.json b/package.json index f684a970..6f02e5f4 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "zod": "^3.20.6" }, "engines": { - "node": "18.x", + "node": "20.x", "yarn": "^1.22.17" }, "packageManager": "yarn@1.22.17"