From dd820c3c61908930ed9d0f7c572e752fa0412b3f Mon Sep 17 00:00:00 2001 From: Xiaojun Weng Date: Thu, 30 Apr 2026 11:54:32 +0800 Subject: [PATCH] ci: update node version to 24 --- .github/workflows/ci-check.yml | 8 ++++---- .github/workflows/create-publish-pr.yml | 16 ++++++++++------ .github/workflows/publish.yml | 4 ++-- .github/workflows/sync.yml | 18 +++++++++--------- package.json | 2 +- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-check.yml b/.github/workflows/ci-check.yml index 9493e2e54..d3c295aa0 100644 --- a/.github/workflows/ci-check.yml +++ b/.github/workflows/ci-check.yml @@ -2,8 +2,8 @@ name: "CI Check" on: pull_request: - branches: - - '**' + branches: + - "**" # Cancel prev CI if new commit come concurrency: @@ -15,13 +15,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [20] + node: [24] name: Run Test on Node ${{ matrix.node }} steps: - name: checkout uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: Setup yarn diff --git a/.github/workflows/create-publish-pr.yml b/.github/workflows/create-publish-pr.yml index 3e2d28c7f..847716b76 100644 --- a/.github/workflows/create-publish-pr.yml +++ b/.github/workflows/create-publish-pr.yml @@ -3,18 +3,18 @@ on: workflow_dispatch: inputs: semver: - description: 'New Version(semver)' + description: "New Version(semver)" required: true - default: 'patch' + default: "patch" type: choice options: - patch - minor slack_user: required: false - description: 'Inform slack user when publish is done' + description: "Inform slack user when publish is done" type: string - + permissions: contents: write pull-requests: write @@ -25,6 +25,10 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: 24 - name: Install Lerna 4.0.0 run: npm install --global lerna@4.0.0 - name: Update Version @@ -51,7 +55,7 @@ jobs: branch: release/${{ env.PACKAGE_VERSION }} branch-suffix: timestamp delete-branch: true - title: 'v${{ env.PACKAGE_VERSION }}' + title: "v${{ env.PACKAGE_VERSION }}" body: | ${{ steps.release_note.outputs.stdout }} labels: "Type: Release" @@ -67,4 +71,4 @@ jobs: with: name: publish-output-v${{ env.PACKAGE_VERSION }} token: ${{ secrets.GITHUB_TOKEN }} - path: output.txt \ No newline at end of file + path: output.txt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c368c4623..02c2fc206 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [20] + node: [24] name: Publish on Node ${{ matrix.node }} steps: - name: checkout @@ -70,7 +70,7 @@ jobs: if: steps.tag_check.outputs.exists_tag == 'false' uses: actions/setup-node@v4 with: - node-version: 22.14.0 + node-version: 24 registry-url: https://registry.npmjs.org - name: Install npm with OIDC support if: steps.tag_check.outputs.exists_tag == 'false' diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 0fb10b814..d443f6d5d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -5,29 +5,29 @@ on: workflow_dispatch: inputs: description: - description: 'Description for the sync action' + description: "Description for the sync action" required: false slack_user: - description: 'Slack user ID to notify (e.g., U123456)' + description: "Slack user ID to notify (e.g., U123456)" required: false # 外部 dispatch 触发 repository_dispatch: types: [sync-icons] # 定时执行:每天 UTC 时间 0:00(北京时间 8:00) schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" jobs: sync-icon: runs-on: ubuntu-latest strategy: matrix: - node: [20] + node: [24] steps: - name: Checkout repository uses: actions/checkout@v4 - name: Setup node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} cache: "yarn" @@ -42,12 +42,12 @@ jobs: uses: peter-evans/create-pull-request@v5 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: '[SYNC-ICON]: update icons' + commit-message: "[SYNC-ICON]: update icons" committer: netweng author: netweng delete-branch: true branch-suffix: short-commit-hash - title: '[SYNC-ICON]: update icons' + title: "[SYNC-ICON]: update icons" labels: feat body: | Sync Icons from figma @@ -75,9 +75,9 @@ jobs: PR_URL="${{ steps.cpr.outputs.pull-request-url }}" PR_NUMBER="${{ steps.cpr.outputs.pull-request-number }}" SLACK_USER_MENTION="${{ steps.set_slack_user.outputs.slack_user_mention }}" - + TEXT="🎨 Icons Synced! New PR created: <${PR_URL}|#${PR_NUMBER}>\n${DESCRIPTION} ${SLACK_USER_MENTION}" - + PAYLOAD=$(jq -n --arg text "$TEXT" '{text: $text}') echo "payload<> $GITHUB_OUTPUT echo "$PAYLOAD" >> $GITHUB_OUTPUT diff --git a/package.json b/package.json index 37e62a8f9..3b932c2fe 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "bundlewatch": "^0.3.3" }, "engines": { - "node": "20.x" + "node": "24.x" }, "resolutions": { "@types/react": "^17.0.50"