9797 run : npm run build
9898 working-directory : apps/desktop
9999
100- windows-x64 :
101- name : Build and publish Windows x64
100+ windows :
101+ name : Build and publish Windows x64 and ARM64
102102 needs : release-preflight
103103 runs-on : windows-latest
104104 env :
@@ -158,6 +158,9 @@ jobs:
158158 - name : Select stable Rust
159159 uses : dtolnay/rust-toolchain@stable
160160
161+ - name : Install Windows ARM64 Rust target
162+ run : rustup target add aarch64-pc-windows-msvc
163+
161164 - name : Cache Rust build
162165 uses : Swatinem/rust-cache@v2
163166
@@ -228,13 +231,13 @@ jobs:
228231 tenant-id : ${{ env.AZURE_TENANT_ID }}
229232 subscription-id : ${{ env.AZURE_SUBSCRIPTION_ID }}
230233
231- - name : Prepare unsigned Windows sidecars
234+ - name : Prepare unsigned Windows x64 sidecars
232235 shell : pwsh
233236 env :
234237 LOCALITY_WINDOWS_EXTERNAL_CODESIGN : " "
235238 run : ./apps/desktop/scripts/prepare-windows-bundle.ps1
236239
237- - name : Sign Windows sidecars
240+ - name : Sign Windows x64 sidecars
238241 if : steps.windows-signing.outputs.enabled == 'true'
239242 uses : azure/artifact-signing-action@v2
240243 with :
@@ -246,7 +249,7 @@ jobs:
246249 timestamp-rfc3161 : http://timestamp.acs.microsoft.com
247250 timestamp-digest : SHA256
248251
249- - name : Validate signed Windows sidecars
252+ - name : Validate signed Windows x64 sidecars
250253 if : steps.windows-signing.outputs.enabled == 'true'
251254 shell : pwsh
252255 run : |
@@ -255,13 +258,49 @@ jobs:
255258 Assert-LocalityWindowsSigned -Path (Join-Path "apps/desktop/src-tauri/windows" $name)
256259 }
257260
258- - name : Build, sign, and validate Windows installer
261+ - name : Build, sign, and validate Windows x64 installer
259262 shell : pwsh
260263 env :
261264 LOCALITY_WINDOWS_BUNDLE_PREPARED : " 1"
262265 PUBLISH_ALLOW_DIRTY : " 1"
263266 run : ./scripts/publish-windows.ps1
264267
268+ - name : Prepare unsigned Windows ARM64 sidecars
269+ shell : pwsh
270+ env :
271+ LOCALITY_WINDOWS_EXTERNAL_CODESIGN : " "
272+ LOCALITY_WINDOWS_TARGET : aarch64-pc-windows-msvc
273+ run : ./apps/desktop/scripts/prepare-windows-bundle.ps1
274+
275+ - name : Sign Windows ARM64 sidecars
276+ if : steps.windows-signing.outputs.enabled == 'true'
277+ uses : azure/artifact-signing-action@v2
278+ with :
279+ endpoint : ${{ env.AZURE_ARTIFACT_SIGNING_ENDPOINT }}
280+ signing-account-name : ${{ env.AZURE_ARTIFACT_SIGNING_ACCOUNT }}
281+ certificate-profile-name : ${{ env.AZURE_ARTIFACT_SIGNING_CERTIFICATE_PROFILE }}
282+ files-folder : ${{ github.workspace }}\apps\desktop\src-tauri\windows
283+ files-folder-filter : exe
284+ timestamp-rfc3161 : http://timestamp.acs.microsoft.com
285+ timestamp-digest : SHA256
286+
287+ - name : Validate signed Windows ARM64 sidecars
288+ if : steps.windows-signing.outputs.enabled == 'true'
289+ shell : pwsh
290+ run : |
291+ . ./scripts/windows-codesign.ps1
292+ foreach ($name in @("loc.exe", "localityd.exe", "locality-cloud-files.exe")) {
293+ Assert-LocalityWindowsSigned -Path (Join-Path "apps/desktop/src-tauri/windows" $name)
294+ }
295+
296+ - name : Build, sign, and validate Windows ARM64 installer
297+ shell : pwsh
298+ env :
299+ LOCALITY_WINDOWS_BUNDLE_PREPARED : " 1"
300+ LOCALITY_WINDOWS_TARGET : aarch64-pc-windows-msvc
301+ PUBLISH_ALLOW_DIRTY : " 1"
302+ run : ./scripts/publish-windows.ps1
303+
265304 - name : Sign Windows installers
266305 if : steps.windows-signing.outputs.enabled == 'true'
267306 uses : azure/artifact-signing-action@v2
@@ -299,32 +338,46 @@ jobs:
299338 - name : Create standard GitHub asset names
300339 shell : pwsh
301340 run : |
302- $source = "target/release/bundle/windows/Locality-release-windows-x86_64-setup.exe"
303- $destination = "target/release/bundle/windows/Locality_Windows_v$env:APP_VERSION.exe"
304- $latestDestination = "target/release/bundle/windows/Locality_Windows.exe"
305- if (-not (Test-Path -LiteralPath $source)) {
306- Write-Error "Could not find Windows installer $source."
307- exit 1
308- }
309- if (-not (Test-Path -LiteralPath "$source.sig")) {
310- Write-Error "Could not find Windows updater signature $source.sig."
311- exit 1
312- }
313- Copy-Item -LiteralPath $source -Destination $destination -Force
314- Copy-Item -LiteralPath "$source.sig" -Destination "$destination.sig" -Force
315- Copy-Item -LiteralPath $source -Destination $latestDestination -Force
316- Copy-Item -LiteralPath "$source.sig" -Destination "$latestDestination.sig" -Force
317- foreach ($path in @($destination, $latestDestination)) {
318- $hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $path).Hash.ToLowerInvariant()
319- "$hash $(Split-Path -Leaf $path)" | Set-Content -Encoding ascii -LiteralPath "$path.sha256"
341+ function Copy-InstallerAsset {
342+ param(
343+ [string] $Source,
344+ [string] $VersionedDestination,
345+ [string] $LatestDestination
346+ )
347+ if (-not (Test-Path -LiteralPath $Source)) {
348+ Write-Error "Could not find Windows installer $Source."
349+ exit 1
350+ }
351+ if (-not (Test-Path -LiteralPath "$Source.sig")) {
352+ Write-Error "Could not find Windows updater signature $Source.sig."
353+ exit 1
354+ }
355+ Copy-Item -LiteralPath $Source -Destination $VersionedDestination -Force
356+ Copy-Item -LiteralPath "$Source.sig" -Destination "$VersionedDestination.sig" -Force
357+ Copy-Item -LiteralPath $Source -Destination $LatestDestination -Force
358+ Copy-Item -LiteralPath "$Source.sig" -Destination "$LatestDestination.sig" -Force
359+ foreach ($path in @($VersionedDestination, $LatestDestination)) {
360+ $hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $path).Hash.ToLowerInvariant()
361+ "$hash $(Split-Path -Leaf $path)" | Set-Content -Encoding ascii -LiteralPath "$path.sha256"
362+ }
320363 }
321364
365+ Copy-InstallerAsset `
366+ -Source "target/release/bundle/windows/Locality-release-windows-x86_64-setup.exe" `
367+ -VersionedDestination "target/release/bundle/windows/Locality_Windows_v$env:APP_VERSION.exe" `
368+ -LatestDestination "target/release/bundle/windows/Locality_Windows.exe"
369+ Copy-InstallerAsset `
370+ -Source "target/release/bundle/windows/Locality-release-windows-aarch64-setup.exe" `
371+ -VersionedDestination "target/release/bundle/windows/Locality_Windows_ARM64_v$env:APP_VERSION.exe" `
372+ -LatestDestination "target/release/bundle/windows/Locality_Windows_ARM64.exe"
373+
322374 - name : Render Windows updater manifest
323375 shell : bash
324376 env :
325377 GITHUB_RELEASE_TAG : ${{ env.RELEASE_TAG }}
326378 UPDATER_MANIFEST_OUTPUT : target/release/bundle/updater/latest-windows.json
327379 UPDATER_WINDOWS_X86_64_ARTIFACT : target/release/bundle/windows/Locality_Windows_v${{ env.APP_VERSION }}.exe
380+ UPDATER_WINDOWS_AARCH64_ARTIFACT : target/release/bundle/windows/Locality_Windows_ARM64_v${{ env.APP_VERSION }}.exe
328381 UPDATER_NOTES : Locality ${{ env.APP_VERSION }} Windows update.
329382 run : scripts/render-tauri-updater-manifest.sh
330383
@@ -333,7 +386,9 @@ jobs:
333386 run : |
334387 New-Item -ItemType Directory -Force -Path target/release/github-assets | Out-Null
335388 Copy-Item "target/release/bundle/windows/Locality_Windows_v$env:APP_VERSION.exe*" target/release/github-assets/
389+ Copy-Item "target/release/bundle/windows/Locality_Windows_ARM64_v$env:APP_VERSION.exe*" target/release/github-assets/
336390 Copy-Item target/release/bundle/windows/Locality_Windows.exe* target/release/github-assets/
391+ Copy-Item target/release/bundle/windows/Locality_Windows_ARM64.exe* target/release/github-assets/
337392 Copy-Item target/release/bundle/updater/latest-windows.json target/release/github-assets/
338393 Get-ChildItem target/release/github-assets -File |
339394 Sort-Object Name |
0 commit comments