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.
This commit is contained in:
2026-07-18 04:49:05 -04:00
parent 3952c28f16
commit 9bb4087b28
+13
View File
@@ -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 }}