Browse Source

chore: downgrade node version in ci (#1016)

chenjiawei.inizio 1 month ago
parent
commit
527e4a6894

+ 35 - 35
.github/workflows/ci.yml

@@ -1,38 +1,38 @@
 name: CI
 on:
-    push:
-        branches: ['main']
-    pull_request:
-        branches: ['main']
-    merge_group:
-        branches: ['main']
+  push:
+    branches: ["main"]
+  pull_request:
+    branches: ["main"]
+  merge_group:
+    branches: ["main"]
 jobs:
-    build:
-        runs-on: ubuntu-latest
-        steps:
-            - uses: actions/checkout@v3
-              with:
-                  fetch-depth: 0
-            - name: Config Git User
-              run: |
-                  git config --local user.name "dragooncjw"
-                  git config --local user.email "289056872@qq.com"
-            - name: For Debug
-              run: |
-                  echo "Listing files in the root directory:"
-                  ls -alh
-            - uses: actions/setup-node@v3
-              with:
-                  node-version: 22
-            # - name: Verify Change Logs
-            #   run: node common/scripts/install-run-rush.js change --verify
-            - name: Rush Install
-              run: node common/scripts/install-run-rush.js install
-            - name: Rush build
-              run: node common/scripts/install-run-rush.js build
-            - name: Check Lint
-              run: node common/scripts/install-run-rush.js lint --verbose
-            - name: Check TS
-              run: node common/scripts/install-run-rush.js ts-check
-            - name: Test (coverage)
-              run: node common/scripts/install-run-rush.js test:cov
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      - name: Config Git User
+        run: |
+          git config --local user.name "dragooncjw"
+          git config --local user.email "289056872@qq.com"
+      - name: For Debug
+        run: |
+          echo "Listing files in the root directory:"
+          ls -alh
+      - uses: actions/setup-node@v3
+        with:
+          node-version: 18
+      # - name: Verify Change Logs
+      #   run: node common/scripts/install-run-rush.js change --verify
+      - name: Rush Install
+        run: node common/scripts/install-run-rush.js install
+      - name: Rush build
+        run: node common/scripts/install-run-rush.js build
+      - name: Check Lint
+        run: node common/scripts/install-run-rush.js lint --verbose
+      - name: Check TS
+        run: node common/scripts/install-run-rush.js ts-check
+      - name: Test (coverage)
+        run: node common/scripts/install-run-rush.js test:cov

+ 1 - 1
.github/workflows/common-pr-checks.yml

@@ -19,7 +19,7 @@ jobs:
 
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
+          node-version: 18
 
       - name: Install Dependencies
         run: node common/scripts/install-run-rush.js install

+ 3 - 4
.github/workflows/deploy.yml

@@ -1,6 +1,5 @@
 name: Deploy With Actions
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "main-deploy-branch-workflow"
@@ -26,8 +25,8 @@ jobs:
 
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
 
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install -t @flowgram.ai/docs

+ 3 - 3
.github/workflows/e2e.yml

@@ -2,9 +2,9 @@ name: E2E Tests
 
 on:
   pull_request:
-    branches: [ "main" ]
+    branches: ["main"]
   merge_group:
-    branches: [ "main" ]
+    branches: ["main"]
 
 jobs:
   e2e:
@@ -15,7 +15,7 @@ jobs:
 
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
+          node-version: 18
 
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install

+ 4 - 6
.github/workflows/publish-alpha.yml

@@ -1,10 +1,9 @@
 name: Publish Alpha Version
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "main-branch-alpha-publish-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -46,8 +45,8 @@ jobs:
           echo "The package output version is ${{ steps.get_version.outputs.version }}"
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build
@@ -82,4 +81,3 @@ jobs:
         run: |
           git tag "v$NEW_VERSION"
           git push origin "v$NEW_VERSION"
-

+ 7 - 8
.github/workflows/publish-app-to-version.yml

@@ -2,14 +2,14 @@ name: Publish App To Version
 on:
   workflow_dispatch:
     inputs:
-        sdk-version:
-          description: '要升级到的 SDK 版本(e.g. 1.0.0)'
-          required: true
-          default: ''
+      sdk-version:
+        description: "要升级到的 SDK 版本(e.g. 1.0.0)"
+        required: true
+        default: ""
 
 concurrency:
   group: "main-branch-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -41,8 +41,8 @@ jobs:
           echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build
@@ -74,4 +74,3 @@ jobs:
         run: |
           git tag "v$NEW_VERSION"
           git push origin "v$NEW_VERSION"
-

+ 4 - 5
.github/workflows/publish-app.yml

@@ -1,10 +1,9 @@
 name: Publish-Apps
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "main-branch-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -38,8 +37,8 @@ jobs:
           echo "The package output version is ${{ steps.get_version.outputs.version }}"
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build

+ 4 - 6
.github/workflows/publish-minor.yml

@@ -1,10 +1,9 @@
 name: Publish-Minor
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "main-branch-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -40,8 +39,8 @@ jobs:
           echo "The package output version is ${{ steps.get_version.outputs.version }}"
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build
@@ -74,4 +73,3 @@ jobs:
         run: |
           git tag "v$NEW_VERSION"
           git push origin "v$NEW_VERSION"
-

+ 7 - 8
.github/workflows/publish-to-version.yml

@@ -2,14 +2,14 @@ name: Publish To Version
 on:
   workflow_dispatch:
     inputs:
-        sdk-version:
-          description: '要升级到的 SDK 版本(e.g. 1.0.0)'
-          required: true
-          default: ''
+      sdk-version:
+        description: "要升级到的 SDK 版本(e.g. 1.0.0)"
+        required: true
+        default: ""
 
 concurrency:
   group: "main-branch-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -41,8 +41,8 @@ jobs:
           echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build
@@ -74,4 +74,3 @@ jobs:
         run: |
           git tag "v$NEW_VERSION"
           git push origin "v$NEW_VERSION"
-

+ 4 - 6
.github/workflows/publish.yml

@@ -1,10 +1,9 @@
 name: Publish
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "main-branch-workflow" # 唯一标识符,确保只运行一个实例
-  cancel-in-progress: false     # 不取消正在运行的实例,后续触发需要等待当前实例完成
+  cancel-in-progress: false # 不取消正在运行的实例,后续触发需要等待当前实例完成
 
 jobs:
   build:
@@ -40,8 +39,8 @@ jobs:
           echo "The package output version is ${{ steps.get_version.outputs.version }}"
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
-          registry-url: 'https://registry.npmjs.org/'
+          node-version: 18
+          registry-url: "https://registry.npmjs.org/"
       - name: Rush Install
         run: node common/scripts/install-run-rush.js install
       - name: Rush build
@@ -74,4 +73,3 @@ jobs:
         run: |
           git tag "v$NEW_VERSION"
           git push origin "v$NEW_VERSION"
-

+ 2 - 3
.github/workflows/sync-screenshot.yml

@@ -1,6 +1,5 @@
 name: Sync Screenshot
-on:
-  workflow_dispatch
+on: workflow_dispatch
 
 concurrency:
   group: "manual-sync-screenshot"
@@ -17,7 +16,7 @@ jobs:
 
       - uses: actions/setup-node@v3
         with:
-          node-version: 22
+          node-version: 18
 
       - name: Set Git user.name and user.email from trigger actor
         run: |