Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/desktop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,21 @@ jobs:

- uses: dtolnay/rust-toolchain@stable

# 与 CI 和 Linux 发布任务一样装官方 release。choco 源出错时安装会失败,
# 但旧步骤最后一条命令是 Out-File,步骤仍显示成功,十几分钟后才在构建里报找不到 protoc。
- name: Install protobuf compiler
env:
PROTOC_VERSION: "34.0"
run: |
choco install protoc -y --no-progress
"$env:ChocolateyInstall\lib\protoc\tools\bin" | Out-File -Append $env:GITHUB_PATH
$archive = Join-Path $env:RUNNER_TEMP "protoc.zip"
$destination = Join-Path $env:RUNNER_TEMP "protoc-$env:PROTOC_VERSION"
Invoke-WebRequest -Uri "https://github.com/protocolbuffers/protobuf/releases/download/v$env:PROTOC_VERSION/protoc-$env:PROTOC_VERSION-win64.zip" -OutFile $archive
Expand-Archive -Path $archive -DestinationPath $destination -Force
$protoc = Join-Path $destination "bin\protoc.exe"
& $protoc --version
if ($LASTEXITCODE -ne 0) { throw "protoc verification failed: $LASTEXITCODE" }
"PROTOC=$protoc" | Out-File -Append $env:GITHUB_ENV
(Split-Path $protoc) | Out-File -Append $env:GITHUB_PATH

- uses: Swatinem/rust-cache@v2
with:
Expand Down
Loading