Skip to content

Commit 8412451

Browse files
shanselmanCopilot
andcommitted
feat(setup): enforce validated gateway releases
Co-authored-by: Copilot App <[email protected]>
1 parent 650247d commit 8412451

31 files changed

Lines changed: 2222 additions & 332 deletions

‎.github/workflows/ci.yml‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -42,48 +42,6 @@ jobs:
4242
with:
4343
fetch-depth: 0
4444

45-
- name: Detect gateway LKG drift from npm latest
46-
id: gateway_lkg_drift
47-
continue-on-error: true
48-
shell: pwsh
49-
run: |
50-
$sourcePath = "src/OpenClaw.SetupEngine/GatewayLkgVersion.cs"
51-
$source = Get-Content -LiteralPath $sourcePath -Raw
52-
$match = [regex]::Match($source, 'LkgVersion\s*=\s*"([^"]+)"')
53-
if (-not $match.Success) {
54-
throw "Unable to parse LKG version from $sourcePath"
55-
}
56-
57-
$pinned = $match.Groups[1].Value
58-
$latest = (Invoke-RestMethod -Uri "https://registry.npmjs.org/openclaw/latest" -TimeoutSec 30).version
59-
if ([string]::IsNullOrWhiteSpace($latest)) {
60-
throw "Unable to resolve npm latest version for openclaw."
61-
}
62-
if ($latest -notmatch '^[0-9]+\.[0-9]+\.[0-9]+([.\-+][A-Za-z0-9.\-]+)*$') {
63-
throw "Resolved npm latest version has unexpected format: $latest"
64-
}
65-
66-
"pinned=$pinned" >> $env:GITHUB_OUTPUT
67-
"latest=$latest" >> $env:GITHUB_OUTPUT
68-
69-
if ($pinned -ne $latest) {
70-
"drifted=true" >> $env:GITHUB_OUTPUT
71-
Write-Host "::warning::Gateway LKG drift detected: pinned $pinned, npm latest $latest. Run gateway-lkg-update workflow to refresh the standing draft PR."
72-
Write-Error "Gateway LKG drift detected (pinned $pinned, npm latest $latest)."
73-
"### :warning: Gateway LKG drift detected" >> $env:GITHUB_STEP_SUMMARY
74-
"" >> $env:GITHUB_STEP_SUMMARY
75-
"- Pinned LKG: $pinned" >> $env:GITHUB_STEP_SUMMARY
76-
"- npm latest: $latest" >> $env:GITHUB_STEP_SUMMARY
77-
"- Action: run `gateway-lkg-update` to refresh the standing draft PR." >> $env:GITHUB_STEP_SUMMARY
78-
exit 1
79-
} else {
80-
"drifted=false" >> $env:GITHUB_OUTPUT
81-
Write-Host "Gateway LKG is current ($pinned)."
82-
"### Gateway LKG is current" >> $env:GITHUB_STEP_SUMMARY
83-
"" >> $env:GITHUB_STEP_SUMMARY
84-
"- Pinned LKG: $pinned" >> $env:GITHUB_STEP_SUMMARY
85-
}
86-
8745
- name: Setup .NET 10
8846
uses: actions/setup-dotnet@v6
8947
with:

‎.github/workflows/gateway-lkg-update.yml‎

Lines changed: 0 additions & 141 deletions
This file was deleted.

0 commit comments

Comments
 (0)