diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ec3c30797..72e205630 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,10 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24.x - name: Install dependencies run: yarn install --check-files - name: build @@ -90,7 +94,7 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 24.x - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96343481e..372ad744f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,10 @@ jobs: run: |- git config user.name "github-actions" git config user.email "github-actions@github.com" + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: release @@ -63,7 +67,7 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 24.x - name: Download build artifacts uses: actions/download-artifact@v4 with: @@ -93,7 +97,7 @@ jobs: steps: - uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 24.x - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/upgrade-main.yml b/.github/workflows/upgrade-main.yml index 1e62f1d2a..ef1870061 100644 --- a/.github/workflows/upgrade-main.yml +++ b/.github/workflows/upgrade-main.yml @@ -18,6 +18,10 @@ jobs: uses: actions/checkout@v4 with: ref: main + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 24.x - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies diff --git a/.projenrc.ts b/.projenrc.ts index 10eff3193..70682ea18 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -13,6 +13,7 @@ const project = new cdk.JsiiProject({ devDeps: ['fs-extra', '@types/fs-extra', 'glob'], jsiiVersion: '5.2.x', typescriptVersion: '5.2.x', + workflowNodeVersion: '24.x', autoApproveUpgrades: true, autoApproveOptions: { allowedUsernames: ['cdklabs-automation'] }, diff --git a/src/model/actions-metadata-model.ts b/src/model/actions-metadata-model.ts index b61a6466f..b765b713b 100644 --- a/src/model/actions-metadata-model.ts +++ b/src/model/actions-metadata-model.ts @@ -129,6 +129,11 @@ export enum RunsUsing { */ NODE_20 = 'node20', + /** + * "node24" + */ + NODE_24 = 'node24', + /** * "composite" */ @@ -151,6 +156,7 @@ interface Runs { * - use `RunsUsing.NODE_12` for Node.js v12. * - use `RunsUsing.NODE_16` for Node.js v16. * - use `RunsUsing.NODE_20` for Node.js v20. + * - use `RunsUsing.NODE_24` for Node.js v24. * * For composite actions: * - use `RunsUsing.COMPOSITE` diff --git a/test/action.test.ts b/test/action.test.ts index 01e7d125e..896a7b901 100644 --- a/test/action.test.ts +++ b/test/action.test.ts @@ -21,7 +21,7 @@ describe('GitHubActionTypeScriptProject', () => { defaultReleaseBranch: 'main', actionMetadata: { runs: { - using: RunsUsing.NODE_12, + using: RunsUsing.NODE_24, main: 'dist/index.js', }, inputs: { @@ -39,7 +39,7 @@ describe('GitHubActionTypeScriptProject', () => { const workflow = synthSnapshot(project)['action.yml']; expect(workflow).toContain( - 'runs:\n using: node12\n main: dist/index.js', + 'runs:\n using: node24\n main: dist/index.js', ); expect(workflow).toContain( 'inputs:\n input1:\n description: my first input',