feat: release 2.3.3 differential update diagnostics

This commit is contained in:
ILoveBingLu
2026-04-02 14:18:40 +08:00
parent 03a842493b
commit c8c5b437f9
9 changed files with 304 additions and 16 deletions
+32
View File
@@ -103,6 +103,7 @@ jobs:
run: |
$version = "${{ needs.prepare-meta.outputs.version }}"
$installer = "release/CipherTalk-$version-Setup.exe"
$blockmaps = Get-ChildItem "release" -Filter "*.blockmap" -ErrorAction SilentlyContinue
if (-not (Test-Path $installer)) {
Write-Error "Installer not found: $installer"
exit 1
@@ -111,6 +112,10 @@ jobs:
Write-Error "latest.yml not found"
exit 1
}
if (-not $blockmaps -or $blockmaps.Count -lt 1) {
Write-Error "blockmap not found"
exit 1
}
- name: Upload release binaries
uses: actions/upload-artifact@v4
@@ -206,6 +211,7 @@ jobs:
run: |
$version = "${{ needs.prepare-meta.outputs.version }}"
$installer = "release/CipherTalk-$version-Setup.exe"
$blockmaps = Get-ChildItem "release" -Filter "*.blockmap" -ErrorAction SilentlyContinue
if (-not (Test-Path $installer)) {
Write-Error "Installer not found: $installer"
exit 1
@@ -222,6 +228,10 @@ jobs:
Write-Error "release-body.md not found"
exit 1
}
if (-not $blockmaps -or $blockmaps.Count -lt 1) {
Write-Error "blockmap not found"
exit 1
}
- name: Create or update GitHub Release
uses: softprops/action-gh-release@v2.5.0
@@ -282,6 +292,12 @@ jobs:
$bucket = "s3://$($env:R2_BUCKET_NAME)"
$version = "${{ needs.prepare-meta.outputs.version }}"
$currentInstaller = "CipherTalk-$version-Setup.exe"
$currentBlockmaps = Get-ChildItem "release" -Filter "*.blockmap" -ErrorAction SilentlyContinue
if (-not $currentBlockmaps -or $currentBlockmaps.Count -lt 1) {
Write-Error "blockmap not found"
exit 1
}
$existingInstallers = aws s3 ls $bucket --endpoint-url $endpoint | ForEach-Object {
$line = $_.ToString().Trim()
@@ -290,15 +306,31 @@ jobs:
}
} | Where-Object { $_ }
$existingBlockmaps = aws s3 ls $bucket --endpoint-url $endpoint | ForEach-Object {
$line = $_.ToString().Trim()
if ($line -match '\.blockmap$') {
($line -split '\s+')[-1]
}
} | Where-Object { $_ }
foreach ($installer in $existingInstallers) {
if ($installer -ne $currentInstaller) {
aws s3 rm "$bucket/$installer" --endpoint-url $endpoint
}
}
foreach ($blockmap in $existingBlockmaps) {
if ($currentBlockmaps.Name -notcontains $blockmap) {
aws s3 rm "$bucket/$blockmap" --endpoint-url $endpoint
}
}
aws s3 cp "release/$currentInstaller" "$bucket/$currentInstaller" --endpoint-url $endpoint
aws s3 cp "release/latest.yml" "$bucket/latest.yml" --endpoint-url $endpoint
aws s3 cp "release/force-update.json" "$bucket/force-update.json" --endpoint-url $endpoint
foreach ($blockmap in $currentBlockmaps) {
aws s3 cp $blockmap.FullName "$bucket/$($blockmap.Name)" --endpoint-url $endpoint
}
notify-telegram-success:
runs-on: windows-latest