@@ -128,14 +128,21 @@ jobs:
128
128
shell : pwsh
129
129
$ErrorActionPreference = "Stop"
130
130
131
+ # The Update-AppCast.ps1 script fetches the release notes from GitHub,
132
+ # which might take a few seconds to be ready.
133
+ Start-Sleep -Seconds 10
134
+
135
+ # Save the appcast signing key to a temporary file.
131
136
$keyPath = Join-Path $env:TEMP "appcast-key.pem"
132
137
$key = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($env:APPCAST_SIGNATURE_KEY_BASE64))
133
138
Set-Content -Path $keyPath -Value $key
134
139
140
+ # Download the old appcast from GCS.
135
141
$oldAppCastPath = Join-Path $env:TEMP "appcast.old.xml"
136
142
& gsutil cp $env:APPCAST_GCS_URI $oldAppCastPath
137
143
if ($LASTEXITCODE -ne 0) { throw "Failed to download appcast" }
138
144
145
+ # Generate the new appcast and signature.
139
146
$newAppCastPath = Join-Path $env:TEMP "appcast.new.xml"
140
147
$newAppCastSignaturePath = $newAppCastPath + ".signature"
141
148
& ./scripts/Update-AppCast.ps1 `
@@ -150,6 +157,7 @@ jobs:
150
157
-outputAppCastSignaturePath $newAppCastSignaturePath
151
158
if ($LASTEXITCODE -ne 0) { throw "Failed to generate new appcast" }
152
159
160
+ # Upload the new appcast and signature to GCS.
153
161
& gsutil cp $newAppCastPath $env:APPCAST_GCS_URI
154
162
if ($LASTEXITCODE -ne 0) { throw "Failed to upload new appcast" }
155
163
& gsutil cp $newAppCastSignaturePath $env:APPCAST_SIGNATURE_GCS_URI
0 commit comments