mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 03:25:56 +00:00
Preserve local historical work separately from the release candidate
This commit is contained in:
1 parent
654b7cddd3
commit
ab4bc9fd96
47 files changed
+1711
-204
No files matched your search
@@ -12,16 +12,32 @@ permissions:
|
||||
|
||||
jobs:
|
||||
installer:
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 60
|
||||
runs-on: [self-hosted, Windows, X64, coa-update-acceptance]
|
||||
timeout-minutes: 1440
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
node-version: 26.10.0
|
||||
- run: npm ci
|
||||
- name: Tests
|
||||
run: cargo test --workspace -- --test-threads=1
|
||||
run: cargo test --workspace --locked -- --test-threads=1
|
||||
- name: Windows server upgrade and recovery gate
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
cargo build -p coa-release --locked
|
||||
if ($LASTEXITCODE) { throw 'Verification tools failed to build.' }
|
||||
gh release download base --repo Corfirean/coa-server-build --dir _acceptance-base
|
||||
if ($LASTEXITCODE) { throw 'Signed base download failed.' }
|
||||
& target/debug/coa-release.exe resolve --source https://github.com/Corfirean/coa-server-build/releases/download/edge --out _candidate-manifest.json
|
||||
if ($LASTEXITCODE) { throw 'Cannot pin the candidate server release.' }
|
||||
$version = (Get-Content _candidate-manifest.json -Raw | ConvertFrom-Json).version
|
||||
gh release download "server-$version" --repo Corfirean/coa-server-build --dir _acceptance-candidate
|
||||
if ($LASTEXITCODE) { throw 'Candidate download failed.' }
|
||||
& tools/update-chaos-matrix.ps1 -BasePackage _acceptance-base -CandidatePackage _acceptance-candidate
|
||||
if ($LASTEXITCODE) { throw 'Update/recovery acceptance failed; manager will not be published.' }
|
||||
- name: Build, sign and publish
|
||||
uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
@@ -32,7 +48,29 @@ jobs:
|
||||
tagName: ${{ github.ref_name }}
|
||||
releaseName: CoA Server Manager ${{ github.ref_name }}
|
||||
releaseBody: See the assets to download the installer. Existing installations update themselves.
|
||||
releaseDraft: false
|
||||
releaseDraft: true
|
||||
prerelease: false
|
||||
args: --bundles nsis
|
||||
includeUpdaterJson: true
|
||||
- name: Verify the exact packaged installer
|
||||
shell: pwsh
|
||||
run: |
|
||||
$installer = Get-ChildItem target/release/bundle/nsis/*-setup.exe | Select-Object -First 1
|
||||
if (-not $installer) { throw 'Built installer is missing.' }
|
||||
$destination = Join-Path $env:RUNNER_TEMP ('coa-manager-installer-' + [guid]::NewGuid().ToString('N'))
|
||||
$process = Start-Process -FilePath $installer.FullName -ArgumentList @('/S', "/D=$destination") -WindowStyle Hidden -Wait -PassThru
|
||||
if ($process.ExitCode) { throw 'Silent installer failed.' }
|
||||
$installed = Join-Path $destination 'coa-server-manager.exe'
|
||||
if (-not (Test-Path $installed)) { throw 'Installed manager binary is missing.' }
|
||||
if ((Get-FileHash $installed).Hash -ne (Get-FileHash target/release/coa-server-manager.exe).Hash) { throw 'Installer contains a different manager binary.' }
|
||||
$report = @{ installerSha256 = (Get-FileHash $installer.FullName).Hash.ToLower(); managerSha256 = (Get-FileHash $installed).Hash.ToLower(); source = '${{ github.sha }}'; serverManifestSha256 = (Get-FileHash _acceptance-candidate/manifest.json).Hash.ToLower(); result = 'passed' }
|
||||
$report | ConvertTo-Json | Set-Content installer-acceptance.json -Encoding utf8NoBOM
|
||||
- name: Publish validated draft
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh release upload '${{ github.ref_name }}' installer-acceptance.json --clobber
|
||||
if ($LASTEXITCODE) { throw 'Acceptance report upload failed.' }
|
||||
gh release edit '${{ github.ref_name }}' --draft=false
|
||||
if ($LASTEXITCODE) { throw 'Validated draft publication failed.' }
|
||||
Reference in new issue
Block a user