change workflow

This commit is contained in:
WMJ
2026-08-31 20:23:30 +08:00
parent 319df8b2e3
commit d53b8f6684
+12 -1
View File
@@ -10,12 +10,23 @@ on:
jobs:
build-and-sign:
runs-on: windows-2019
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# 安装 .NET Framework 4.0 Targeting Pack
- name: Install .NET Framework 4.0 Targeting Pack
shell: pwsh
run: |
$vsInstallPath = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
Write-Host "VS Install Path: $vsInstallPath"
$installerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
& $installerPath modify --installPath $vsInstallPath `
--add Microsoft.Net.Component.4.TargetingPack `
--passive --norestart
# .NET Framework 4.0 项目需用 MSBuild,不能用 dotnet build
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2