From 9bb4087b2893054deda08d89d175ebe5ad6c79f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Sat, 18 Jul 2026 04:49:05 -0400 Subject: [PATCH] release.yml: install protoc on the Windows runner The Windows release build failed with os error 193: Windows cannot exec the dotslash bin/protoc launcher directly (no shebang support), and the runner had no protoc on PATH for the build script's documented fallback. Install the exact version the dotslash file pins (v29.3) from the official protobuf release and put it on PATH for the Windows job only. The four Unix targets built successfully and are unaffected. --- .github/workflows/release.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 298b2f9..7febfd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,6 +60,19 @@ jobs: - name: Install dotslash (protoc launcher) run: cargo install dotslash --locked + # Windows cannot exec the dotslash launcher directly (no shebang + # support → os error 193), and the build script's documented fallback + # is a protoc on PATH — install the same version the dotslash file + # pins (v29.3). + - name: Install protoc (Windows PATH fallback) + if: runner.os == 'Windows' + shell: pwsh + run: | + $url = "https://github.com/protocolbuffers/protobuf/releases/download/v29.3/protoc-29.3-win64.zip" + Invoke-WebRequest -Uri $url -OutFile protoc.zip + Expand-Archive protoc.zip -DestinationPath "$env:USERPROFILE\protoc" + Add-Content $env:GITHUB_PATH "$env:USERPROFILE\protoc\bin" + - uses: Swatinem/rust-cache@v2 with: key: ${{ matrix.target }}