-
Notifications
You must be signed in to change notification settings - Fork 97
One-off: restamp workflow for the v3.4.0 archives (#2113/#2147/#2151) #2152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| # ONE-OFF (#2113/#2147/#2151): rebuild the v3.4.0 plain archives from the restamp-3.4.0 branch | ||
| # (= the v3.4.0 tag + ONLY the single-source version-stamp fix cherry-picked) and clobber them onto | ||
| # the existing v3.4.0 release, so downloads stop identifying as 3.3.0 and the update-nag loop ends. | ||
| # | ||
| # Scope is deliberately the PLAIN archives only: PerformanceMonitorLite-3.4.0.zip, | ||
| # PerformanceMonitorDarling-3.4.0.zip, PerformanceMonitorDarling-linux-x64-3.4.0.tar.gz, and the two | ||
| # checksum files (MERGED: replaced assets get new hashes, untouched assets keep their lines). The | ||
| # Velopack chain (delta/full nupkgs, Setup.exe, releases.*.json) is NOT regenerated here — it feeds | ||
| # the in-app updater and its delta chain, and rebuilding that blind risks breaking updates for | ||
| # everyone; it stays the release-cutter's call. | ||
| # | ||
| # Build steps mirror nightly.yml's exactly (same publish shapes, same archive layouts, same | ||
| # pg-runtime staging) with the version taken as plain 3.4.0. DELETE THIS FILE after the run. | ||
|
|
||
| name: Restamp v3.4.0 archives | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| windows: | ||
| runs-on: windows-latest | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: restamp-3.4.0 | ||
|
|
||
| - name: Setup .NET 10.0 | ||
| uses: actions/setup-dotnet@v6 | ||
| with: | ||
| global-json-file: global.json | ||
| cache: true | ||
| cache-dependency-path: '**/packages.lock.json' | ||
|
|
||
| - name: Restore dependencies | ||
| run: | | ||
| dotnet restore Lite/PerformanceMonitorLite.csproj --locked-mode | ||
| dotnet restore Darling/PerformanceMonitor.Darling.Viewer/PerformanceMonitor.Darling.Viewer.csproj --locked-mode | ||
|
|
||
| - name: Publish Lite | ||
| run: dotnet publish Lite/PerformanceMonitorLite.csproj -c Release -o publish/Lite | ||
|
|
||
| - name: Publish Darling Service | ||
| run: dotnet publish Darling/PerformanceMonitor.Darling.Service/PerformanceMonitor.Darling.Service.csproj -c Release -o publish/DarlingService | ||
|
|
||
| - name: Publish Darling Viewer | ||
| run: dotnet publish Darling/PerformanceMonitor.Darling.Viewer/PerformanceMonitor.Darling.Viewer.csproj -c Release -o publish/DarlingViewer | ||
|
|
||
| - name: Verify the stamp actually derives (the whole point) | ||
| shell: pwsh | ||
| run: | | ||
| $v = (Get-Item publish/Lite/PerformanceMonitorLite.dll).VersionInfo | ||
| Write-Host "Lite FileVersion=$($v.FileVersion) ProductVersion=$($v.ProductVersion)" | ||
| if ($v.FileVersion -notlike '3.4.0*') { throw "Lite still stamped $($v.FileVersion) — abort before touching the release" } | ||
| $d = (Get-Item publish/DarlingService/PerformanceMonitor.Darling.Service.dll).VersionInfo | ||
| Write-Host "Darling FileVersion=$($d.FileVersion)" | ||
| if ($d.FileVersion -notlike '3.4.0*') { throw "Darling still stamped $($d.FileVersion) — abort" } | ||
|
|
||
| - name: Cache Darling pg-runtime.zip | ||
| id: cache-pg-runtime | ||
| uses: actions/cache@v6 | ||
| with: | ||
| path: Darling/artifacts/pg-runtime.zip | ||
| key: pg-runtime-${{ runner.os }}-${{ hashFiles('Darling/tools/fetch-pg-runtime.ps1') }} | ||
|
|
||
| - name: Build Darling pg-runtime.zip | ||
| if: steps.cache-pg-runtime.outputs.cache-hit != 'true' | ||
| shell: pwsh | ||
| run: ./Darling/tools/fetch-pg-runtime.ps1 | ||
|
|
||
| - name: Package archives (plain 3.4.0 names) | ||
| shell: pwsh | ||
| run: | | ||
| New-Item -ItemType Directory -Force -Path releases | ||
| Compress-Archive -Path 'publish/Lite/*' -DestinationPath "releases/PerformanceMonitorLite-3.4.0.zip" -Force | ||
|
|
||
| $darlingDir = 'publish/Darling' | ||
| New-Item -ItemType Directory -Force -Path "$darlingDir/viewer" | Out-Null | ||
| Copy-Item 'publish/DarlingService/*' $darlingDir -Recurse | ||
| Copy-Item 'publish/DarlingViewer/*' "$darlingDir/viewer" -Recurse | ||
| Copy-Item 'Darling/artifacts/pg-runtime.zip' $darlingDir | ||
| Compress-Archive -Path 'publish/Darling/*' -DestinationPath "releases/PerformanceMonitorDarling-3.4.0.zip" -Force | ||
|
Comment on lines
+44
to
+86
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No SignPath signing before these archives are built and clobbered onto the release.
Since the comment block at the top says this mirrors Worth confirming this is an intentional, accepted trade-off before running — the PR description doesn't mention it. |
||
|
|
||
| - name: Merge checksums (replaced assets rehashed, untouched lines preserved) | ||
| shell: pwsh | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| gh release download v3.4.0 --pattern SHA256SUMS.txt --output releases/SHA256SUMS.old.txt | ||
| $old = Get-Content releases/SHA256SUMS.old.txt | ||
| $replacedNames = @('PerformanceMonitorLite-3.4.0.zip', 'PerformanceMonitorDarling-3.4.0.zip') | ||
| $kept = $old | Where-Object { $line = $_; -not ($replacedNames | Where-Object { $line -like "*$_*" }) } | ||
| $new = $replacedNames | ForEach-Object { | ||
| $hash = (Get-FileHash "releases/$_" -Algorithm SHA256).Hash.ToLower() | ||
| "$hash $_" | ||
| } | ||
| ($new + $kept) | Out-File -FilePath releases/SHA256SUMS.txt -Encoding utf8 | ||
| Write-Host "Merged SHA256SUMS.txt:" | ||
| Get-Content releases/SHA256SUMS.txt | ||
|
|
||
| - name: Clobber archives onto the v3.4.0 release | ||
| shell: pwsh | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: gh release upload v3.4.0 releases/PerformanceMonitorLite-3.4.0.zip releases/PerformanceMonitorDarling-3.4.0.zip releases/SHA256SUMS.txt --clobber | ||
|
|
||
| linux: | ||
| needs: windows | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v7 | ||
| with: | ||
| ref: restamp-3.4.0 | ||
|
|
||
| - name: Setup .NET 10.0 | ||
| uses: actions/setup-dotnet@v6 | ||
| with: | ||
| global-json-file: global.json | ||
| cache: true | ||
| cache-dependency-path: '**/packages.lock.json' | ||
|
|
||
| - name: Publish service (linux-x64) | ||
| run: dotnet publish Darling/PerformanceMonitor.Darling.Service/PerformanceMonitor.Darling.Service.csproj -c Release -r linux-x64 --self-contained false -o publish/DarlingService-linux | ||
|
|
||
| - name: Package + checksum + clobber | ||
| shell: bash | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p releases | ||
| tar -C publish/DarlingService-linux -czf "releases/PerformanceMonitorDarling-linux-x64-3.4.0.tar.gz" . | ||
| (cd releases && sha256sum "PerformanceMonitorDarling-linux-x64-3.4.0.tar.gz" > SHA256SUMS-linux.txt && cat SHA256SUMS-linux.txt) | ||
| gh release upload v3.4.0 releases/PerformanceMonitorDarling-linux-x64-3.4.0.tar.gz releases/SHA256SUMS-linux.txt --clobber | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: this stamp-verification gate checks
publish/Lite/PerformanceMonitorLite.dllandpublish/DarlingService/PerformanceMonitor.Darling.Service.dll, but notpublish/DarlingViewer/PerformanceMonitor.Darling.Viewer.dll, even though the viewer ships insidePerformanceMonitorDarling-3.4.0.zip(viewer/subfolder, packaged a few steps down). If the single-source stamp fix somehow didn't reach the Viewer project, this gate wouldn't catch it before the archive gets uploaded. Presumably low-risk since it's one shared version source, but the gate's stated purpose is "verify the stamp actually derives" for everything about to ship.