From 8e39ea864fa0e569112bc038af68c69408f51143 Mon Sep 17 00:00:00 2001 From: lincube Date: Sun, 19 Apr 2026 19:33:45 +0800 Subject: [PATCH] =?UTF-8?q?fix.GitHub=20Action=E5=B7=A5=E4=BD=9C=E6=B5=81?= =?UTF-8?q?=E6=80=8E=E4=B9=88=E5=A4=A9=E5=A4=A9=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 11 ++++++++--- .github/workflows/release.yml | 23 +++++++++++++++++------ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f052018..06c1158 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,9 +67,14 @@ jobs: libx11-6 libxrandr2 libxinerama1 \ libxi6 libxcursor1 libxext6 \ libxrender1 libxkbcommon-x11-0 \ - clang zlib1g-dev \ - libportaudio2 libasound2 \ - libwebkit2gtk-4.1-dev + clang zlib1g-dev + + # Ubuntu 24.04+ moved several packages to t64 names. + sudo apt-get install -y libasound2t64 || sudo apt-get install -y libasound2 + sudo apt-get install -y libportaudio2t64 || sudo apt-get install -y libportaudio2 + + # Prefer modern WebKit package, fallback for older images. + sudo apt-get install -y libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev - name: Setup .NET uses: actions/setup-dotnet@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1ede1d3..7219d8d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -321,9 +321,15 @@ jobs: - name: Install vpk if: matrix.self_contained == true && matrix.arch == 'x64' run: | - dotnet tool install --global vpk - echo "$env:USERPROFILE\\.dotnet\\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - vpk --version + $ErrorActionPreference = "Stop" + dotnet tool uninstall --global vpk | Out-Null + if ($LASTEXITCODE -ne 0) { + Write-Host "vpk is not preinstalled, proceeding with fresh install." + } + dotnet tool install --global vpk --allow-roll-forward + "$env:USERPROFILE\\.dotnet\\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + $env:PATH = "$env:USERPROFILE\\.dotnet\\tools;$env:PATH" + vpk -h shell: pwsh - name: Prepare Previous Velopack Full Package @@ -447,9 +453,14 @@ jobs: libx11-6 libxrandr2 libxinerama1 \ libxi6 libxcursor1 libxext6 \ libxrender1 libxkbcommon-x11-0 \ - clang zlib1g-dev \ - libportaudio2 libasound2 \ - libwebkit2gtk-4.1-dev + clang zlib1g-dev + + # Ubuntu 24.04+ moved several packages to t64 names. + sudo apt-get install -y libasound2t64 || sudo apt-get install -y libasound2 + sudo apt-get install -y libportaudio2t64 || sudo apt-get install -y libportaudio2 + + # Prefer modern WebKit package, fallback for older images. + sudo apt-get install -y libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev - name: Setup .NET uses: actions/setup-dotnet@v4