Fix nightly upload on Windows (#40843)

Release Notes:

- N/A
This commit is contained in:
John Tur
2025-10-22 01:55:02 +00:00
committed by GitHub
parent 2338164c10
commit 2903a06e5c
2 changed files with 12 additions and 40 deletions
+3 -3
View File
@@ -281,11 +281,11 @@ jobs:
- name: Build Zed installer
working-directory: ${{ env.ZED_WORKSPACE }}
run: script/bundle-windows.ps1
run: script/bundle-windows.ps1 -Architecture x86_64
- name: Upload Zed Nightly
working-directory: ${{ env.ZED_WORKSPACE }}
run: script/upload-nightly.ps1 windows
run: script/upload-nightly.ps1 -Architecture x86_64
bundle-windows-arm64:
timeout-minutes: 60
@@ -328,7 +328,7 @@ jobs:
- name: Upload Zed Nightly
working-directory: ${{ env.ZED_WORKSPACE }}
run: script/upload-nightly.ps1 windows
run: script/upload-nightly.ps1 -Architecture aarch64
update-nightly-tag:
name: Update nightly tag
+9 -37
View File
@@ -1,32 +1,13 @@
[CmdletBinding()]
Param(
[Parameter()][string]$Architecture
)
# Based on the template in: https://docs.digitalocean.com/reference/api/spaces-api/
$ErrorActionPreference = "Stop"
. "$PSScriptRoot\lib\blob-store.ps1"
. "$PSScriptRoot\lib\workspace.ps1"
$allowedTargets = @("windows")
function Test-AllowedTarget {
param (
[string]$Target
)
return $allowedTargets -contains $Target
}
# Process arguments
if ($args.Count -gt 0) {
$target = $args[0]
if (Test-AllowedTarget $target) {
# Valid target
} else {
Write-Error "Error: Target '$target' is not allowed.`nUsage: $($MyInvocation.MyCommand.Name) [$($allowedTargets -join ', ')]"
exit 1
}
} else {
Write-Error "Error: Target is not specified.`nUsage: $($MyInvocation.MyCommand.Name) [$($allowedTargets -join ', ')]"
exit 1
}
ParseZedWorkspace
Write-Host "Uploading nightly for target: $target"
@@ -44,17 +25,8 @@ $sha | Out-File -FilePath "target/latest-sha" -NoNewline
# Remove-Item -Path $file.FullName
# }
switch ($target) {
"windows" {
UploadToBlobStore -BucketName $bucketName -FileToUpload $env:SETUP_PATH -BlobStoreKey "nightly/Zed-x86_64.exe"
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows"
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "nightly/Zed-$Architecture.exe"
UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows"
Remove-Item -Path $env:SETUP_PATH -ErrorAction SilentlyContinue
Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue
}
default {
Write-Error "Error: Unknown target '$target'"
exit 1
}
}
Remove-Item -Path "target/Zed-$Architecture.exe" -ErrorAction SilentlyContinue
Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue