From 79393b6e0f61e3f50eeeefad5459022aed9e15e0 Mon Sep 17 00:00:00 2001 From: Scott Hanselman Date: Thu, 28 May 2026 23:19:57 -0700 Subject: [PATCH] Fix release metadata verification Read ProductVersion from file metadata instead of loading the published assembly during CI release validation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e418abf50..17244ce8a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -389,14 +389,13 @@ jobs: run: | $expected = "${{ needs.test.outputs.semVer }}" $assemblyPath = Resolve-Path "publish\OpenClaw.Tray.WinUI.dll" - $assembly = [System.Reflection.Assembly]::LoadFile($assemblyPath) - $attribute = $assembly.GetCustomAttributes([System.Reflection.AssemblyInformationalVersionAttribute], $false) | Select-Object -First 1 - if (-not $attribute) { - throw "OpenClaw.Tray.WinUI.dll is missing AssemblyInformationalVersionAttribute." + $metadata = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($assemblyPath) + if ([string]::IsNullOrWhiteSpace($metadata.ProductVersion)) { + throw "OpenClaw.Tray.WinUI.dll is missing ProductVersion metadata." } - $actual = $attribute.InformationalVersion -replace '\+.*$', '' + $actual = $metadata.ProductVersion -replace '\+.*$', '' if ($actual -ne $expected) { - throw "AssemblyInformationalVersion '$actual' did not match GitVersion SemVer '$expected'." + throw "ProductVersion '$actual' did not match GitVersion SemVer '$expected'." } - name: Disable NuGet source mapping for signing