From 29981e123293ccc92fc01f2271cfd26451210cfc Mon Sep 17 00:00:00 2001 From: xuncha <1658671838@qq.com> Date: Sat, 31 Jan 2026 15:51:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9482455..b353404 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,9 +21,25 @@ jobs: - name: Install Node.js uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22.12 cache: 'npm' + - name: Configure Windows SDK WinMD + shell: powershell + run: | + $sdkRoot = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\\10" + $unionRoot = Join-Path $sdkRoot "UnionMetadata" + $refsRoot = Join-Path $sdkRoot "References" + if (!(Test-Path $unionRoot)) { throw "UnionMetadata not found at $unionRoot" } + $winmdDir = Get-ChildItem $unionRoot -Directory | Sort-Object Name -Descending | Select-Object -First 1 + if (!$winmdDir) { throw "No UnionMetadata version directory found" } + $refsDir = Get-ChildItem $refsRoot -Directory | Sort-Object Name -Descending | Select-Object -First 1 + if (!$refsDir) { throw "No References version directory found" } + $libPath = "$($winmdDir.FullName);$($refsDir.FullName)" + "LIBPATH=$libPath" | Out-File -FilePath $env:GITHUB_ENV -Append + "WindowsSdkDir=$sdkRoot\\" | Out-File -FilePath $env:GITHUB_ENV -Append + "WindowsSdkVersion=$($winmdDir.Name)\\" | Out-File -FilePath $env:GITHUB_ENV -Append + - name: Install Dependencies run: npm ci @@ -58,4 +74,4 @@ jobs: [点击加入 Telegram 群](https://t.me/+hn3QzNc4DbA0MzNl) EOF - gh release edit "$GITHUB_REF_NAME" --notes-file release_notes.md \ No newline at end of file + gh release edit "$GITHUB_REF_NAME" --notes-file release_notes.md