@@ -61,22 +61,49 @@ jobs:
6161 - name: Install GitVersion
6262 uses: gittools/actions/gitversion/setup@v4
6363 with:
64- versionSpec: '6.4 .x'
64+ versionSpec: '6.8 .x'
6565
6666 - name: Determine Version
6767 id: gitversion
6868 uses: gittools/actions/gitversion/execute@v4
6969
70- - name: Verify tag version output
71- if: startsWith(github.ref, 'refs/tags/v')
70+ - name: Resolve release version
71+ id: release_version
7272 shell: pwsh
73+ env:
74+ GITVERSION_SEMVER: ${{ steps.gitversion.outputs.semVer }}
75+ GITVERSION_MAJOR_MINOR_PATCH: ${{ steps.gitversion.outputs.majorMinorPatch }}
76+ GH_TOKEN: ${{ github.token }}
7377 run: |
74- $expected = "${{ github.ref_name }}" -replace '^v', ''
75- $actual = "${{ steps.gitversion.outputs.semVer }}"
76- if ($actual -ne $expected) {
77- throw "GitVersion SemVer '$actual' did not match tag '$expected'."
78+ $semVer = $env:GITVERSION_SEMVER
79+ $majorMinorPatch = $env:GITVERSION_MAJOR_MINOR_PATCH
80+ $isPrerelease = $semVer.Contains("-")
81+ $isStableCorrection = $false
82+
83+ if ($env:GITHUB_REF.StartsWith("refs/tags/v", [StringComparison]::Ordinal)) {
84+ $tagVersion = $env:GITHUB_REF_NAME -replace '^v', ''
85+ $correction = [regex]::Match(
86+ $tagVersion,
87+ '^(?<base>(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*))-(?<revision>[1-9]\d*)$')
88+
89+ if ($correction.Success) {
90+ $validation = .\scripts\Test-OpenClawStableCorrectionRelease.ps1 `
91+ -Tag $env:GITHUB_REF_NAME `
92+ -GitHubToken $env:GH_TOKEN
93+ $semVer = $tagVersion
94+ $majorMinorPatch = $validation.BaseVersion
95+ $isPrerelease = $false
96+ $isStableCorrection = $true
97+ } elseif ($semVer -ne $tagVersion) {
98+ throw "GitVersion SemVer '$semVer' did not match tag '$tagVersion'."
99+ }
78100 }
79101
102+ "semVer=$semVer" >> $env:GITHUB_OUTPUT
103+ "majorMinorPatch=$majorMinorPatch" >> $env:GITHUB_OUTPUT
104+ "isPrerelease=$($isPrerelease.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
105+ "isStableCorrection=$($isStableCorrection.ToString().ToLowerInvariant())" >> $env:GITHUB_OUTPUT
106+
80107 - name: Validate documentation
81108 shell: pwsh
82109 run: ./scripts/validate-docs.ps1
@@ -303,8 +330,10 @@ jobs:
303330 if-no-files-found: warn
304331
305332 outputs:
306- semVer: ${{ steps.gitversion.outputs.semVer }}
307- majorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}
333+ semVer: ${{ steps.release_version.outputs.semVer }}
334+ majorMinorPatch: ${{ steps.release_version.outputs.majorMinorPatch }}
335+ isPrerelease: ${{ steps.release_version.outputs.isPrerelease }}
336+ isStableCorrection: ${{ steps.release_version.outputs.isStableCorrection }}
308337
309338 e2etests:
310339 needs: repo-hygiene
@@ -452,6 +481,8 @@ jobs:
452481 build:
453482 needs: [test, e2etests]
454483 runs-on: ${{ matrix.rid == 'win-arm64' && 'windows-11-arm' || 'windows-latest' }}
484+ env:
485+ OPENCLAW_BUILD_VERSION: ${{ needs.test.outputs.semVer }}
455486 strategy:
456487 matrix:
457488 rid: [win-x64, win-arm64]
@@ -478,10 +509,10 @@ jobs:
478509 run: dotnet restore src/OpenClaw.Tray.WinUI -r ${{ matrix.rid }}
479510
480511 - name: Build WinUI Tray App (Release)
481- run: dotnet build src/OpenClaw.Tray.WinUI --no-restore -c Release -r ${{ matrix.rid }}
512+ run: dotnet build src/OpenClaw.Tray.WinUI --no-restore -c Release -r ${{ matrix.rid }} -p:Version=$env:OPENCLAW_BUILD_VERSION -p:InformationalVersion=$env:OPENCLAW_BUILD_VERSION
482513
483514 - name: Publish WinUI Tray App
484- run: dotnet publish src/OpenClaw.Tray.WinUI -c Release -r ${{ matrix.rid }} --self-contained --no-restore -o publish
515+ run: dotnet publish src/OpenClaw.Tray.WinUI -c Release -r ${{ matrix.rid }} --self-contained --no-restore -o publish -p:Version=$env:OPENCLAW_BUILD_VERSION -p:InformationalVersion=$env:OPENCLAW_BUILD_VERSION
485516
486517 - name: Verify x64 Native Runtime Payload
487518 if: matrix.rid == 'win-x64'
@@ -621,6 +652,9 @@ jobs:
621652 actions: read
622653 contents: write
623654 id-token: write
655+ concurrency:
656+ group: openclaw-windows-node-release
657+ cancel-in-progress: false
624658
625659 steps:
626660 - uses: actions/checkout@v7
@@ -777,7 +811,7 @@ jobs:
777811 copy artifacts/tray-win-x64/* publish-x64/ -Recurse
778812 .\scripts\Test-ReleaseNativeDependencies.ps1 -PayloadPath publish-x64 -RequireAppLocalVCRuntime -RequireInstallerVCRedist -InstallerVCRedistPath vc_redist.x64.exe
779813 # Build installer
780- & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ needs.test.outputs.majorMinorPatch }} /DMyAppArch=x64 /Dpublish=publish-x64 /DvcRedist=vc_redist.x64.exe installer.iss
814+ & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ needs.test.outputs.semVer }} /DMyAppArch=x64 /Dpublish=publish-x64 /DvcRedist=vc_redist.x64.exe installer.iss
781815
782816 - name: Build arm64 Installer
783817 run: |
@@ -789,7 +823,7 @@ jobs:
789823 # LoadLibrary an arm64 DLL.
790824 .\scripts\Test-ReleaseNativeDependencies.ps1 -PayloadPath publish-arm64 -RequireAppLocalVCRuntime -RequireInstallerVCRedist -InstallerVCRedistPath vc_redist.arm64.exe -SkipNativeLoadProbe
791825 # Build installer
792- & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ needs.test.outputs.majorMinorPatch }} /DMyAppArch=arm64 /Dpublish=publish-arm64 /DvcRedist=vc_redist.arm64.exe installer.iss
826+ & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ needs.test.outputs.semVer }} /DMyAppArch=arm64 /Dpublish=publish-arm64 /DvcRedist=vc_redist.arm64.exe installer.iss
793827
794828 - name: Sign Installers
795829 uses: azure/artifact-signing-action@v2
@@ -803,6 +837,17 @@ jobs:
803837 timestamp-rfc3161: http://timestamp.acs.microsoft.com
804838 timestamp-digest: SHA256
805839
840+ - name: Revalidate stable correction release ordering
841+ if: needs.test.outputs.isStableCorrection == 'true'
842+ shell: pwsh
843+ env:
844+ GH_TOKEN: ${{ github.token }}
845+ RELEASE_TAG: ${{ github.ref_name }}
846+ run: >
847+ .\scripts\Test-OpenClawStableCorrectionRelease.ps1
848+ -Tag $env:RELEASE_TAG
849+ -GitHubToken $env:GH_TOKEN
850+
806851 - name: Create Release
807852 uses: softprops/action-gh-release@v3
808853 with:
@@ -812,8 +857,8 @@ jobs:
812857 Output/OpenClawCompanion-Setup-arm64.exe
813858 OpenClawTray-${{ needs.test.outputs.semVer }}-win-x64.zip
814859 OpenClawTray-${{ needs.test.outputs.semVer }}-win-arm64.zip
815- prerelease: ${{ contains(github.ref_name, '-') }}
816- make_latest: ${{ contains(github.ref_name, '-') && 'false' || 'true' }}
860+ prerelease: ${{ needs.test.outputs.isPrerelease }}
861+ make_latest: ${{ needs.test.outputs.isPrerelease == 'true' && 'false' || 'true' }}
817862 body: |
818863 ## OpenClaw Windows Hub ${{ github.ref_name }}
819864
0 commit comments