From 2cfe0d8ee84b2adec5a5d32dbb6206e48e777da4 Mon Sep 17 00:00:00 2001 From: xuncha <1658671838@qq.com> Date: Sat, 31 Jan 2026 16:01:21 +0800 Subject: [PATCH] ee --- .github/workflows/release.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 958ba50..a9c565c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,14 +31,20 @@ jobs: $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 + $platformWinmd = Get-ChildItem $unionRoot -Recurse -Filter platform.winmd -ErrorAction SilentlyContinue | + Sort-Object FullName -Descending | Select-Object -First 1 + if (!$platformWinmd) { throw "platform.winmd not found under $unionRoot" } + $platformDir = Split-Path $platformWinmd.FullName -Parent + $versionDir = $platformWinmd.Directory.Name + $refsDir = Join-Path $refsRoot $versionDir + if (!(Test-Path $refsDir)) { + $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 + $libPath = "$platformDir;$($refsDir.FullName)" + Add-Content -Path $env:GITHUB_ENV -Value "LIBPATH=$libPath" -Encoding utf8 + Add-Content -Path $env:GITHUB_ENV -Value "WindowsSdkDir=$sdkRoot\\" -Encoding utf8 + Add-Content -Path $env:GITHUB_ENV -Value "WindowsSdkVersion=$versionDir\\" -Encoding utf8 - name: Install Dependencies run: npm ci