Przeglądaj źródła

ci: Windows 用 setup-protoc 安装 protobuf,避免 Chocolatey 源 504 后静默跳过

Co-authored-by: darknessomi <darknessomi@users.noreply.github.com>
Cursor Agent 4 tygodni temu
rodzic
commit
945c5ef284
2 zmienionych plików z 7 dodań i 3 usunięć
  1. 4 2
      .github/workflows/build.yml
  2. 3 1
      .github/workflows/ci.yml

+ 4 - 2
.github/workflows/build.yml

@@ -82,9 +82,11 @@ jobs:
           brew untap aws/tap || true
           brew install protobuf
 
-      - name: Install Windows dependencies
+      - name: Install protoc (Windows)
         if: runner.os == 'Windows'
-        run: choco install protoc -y
+        uses: arduino/setup-protoc@v3
+        with:
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Install Linux dependencies
         if: runner.os == 'Linux'

+ 3 - 1
.github/workflows/ci.yml

@@ -39,7 +39,9 @@ jobs:
 
       - name: Install protoc (Windows)
         if: matrix.platform == 'windows-latest'
-        run: choco install protoc -y
+        uses: arduino/setup-protoc@v3
+        with:
+          repo-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Rust cache
         uses: Swatinem/rust-cache@v2