Skip to content

Commit 3168da1

Browse files
committed
fix: update Node.js version to 22.x for publish workflow
- Upgrade Node.js version from 20.x to 22.x in GitHub Actions - Reorder build and test steps for better workflow - Add longer timeout (60s) for tests to prevent failures - Move build step to run before tests Change-Id: Ibeb3d38b2997eb0790cffb62a7639a4e4c123cf4 Co-developed-by: Cursor <noreply@cursor.com> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com>
1 parent 8b03841 commit 3168da1

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@ jobs:
1515
- name: Use Node.js
1616
uses: actions/setup-node@v4
1717
with:
18-
node-version: '20.x'
18+
node-version: '22.x'
1919
registry-url: 'https://registry.npmjs.org'
2020

2121
- name: Install dependencies
2222
run: npm ci
2323

24+
- name: Build project
25+
run: npm run build
26+
2427
- name: Run tests
2528
run: npm test
26-
27-
- name: Build
28-
run: npm run build
29+
env:
30+
# Set longer timeout for tests
31+
VITEST_TIMEOUT: 60000
2932

3033
- name: Publish to npm
3134
run: npm publish
3235
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)