Skip to content

Commit bd86b1c

Browse files
authored
Allow build for Windows ARM64 (#799)
1 parent 3e7e2b5 commit bd86b1c

7 files changed

Lines changed: 285 additions & 285 deletions

File tree

.github/workflows/release.yaml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
generate_release_notes: true
2020

2121
create-sbom:
22-
needs: [create-release]
22+
needs:
23+
- create-release
2324
uses: ./.github/workflows/sbom.yml
2425
with:
2526
upload_url: ${{ needs.create-release.outputs.upload_url }}
@@ -292,7 +293,18 @@ jobs:
292293
build-windows:
293294
needs:
294295
- create-release
295-
runs-on: windows-latest
296+
strategy:
297+
fail-fast: false
298+
matrix:
299+
windows_runner:
300+
- windows-latest
301+
- windows-11-arm
302+
include:
303+
- windows_runner: windows-latest
304+
cpu: x64
305+
- windows_runner: windows-11-arm
306+
cpu: arm64
307+
runs-on: ${{ matrix.windows_runner }}
296308
steps:
297309
- uses: actions/checkout@v6
298310
with:
@@ -326,24 +338,28 @@ jobs:
326338
uses: arduino/setup-protoc@v3
327339
with:
328340
repo-token: ${{ secrets.GITHUB_TOKEN }}
329-
- name: Remove "default-run" line from Cargo.toml
330-
run: |
331-
Set-Content -Path ".\src-tauri\Cargo.toml" -Value (get-content -Path ".\src-tauri\Cargo.toml" | Select-String -Pattern 'default-run =' -NotMatch)
332341
- name: Build packages
333-
uses: tauri-apps/tauri-action@v0.5.23 # .24 seems broken, TODO: update when fixed
342+
uses: tauri-apps/tauri-action@v0.5.23 # 0.5.24 - 0.6.1 give: Error: Could not find workspace directory, but version and/or name specifies to use workspace package
334343
env:
335344
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
336345
- name: Upload unsigned bundle
337346
uses: actions/upload-artifact@v4
338347
with:
339348
name: unsigned-bundle
340-
path: src-tauri/target/release/bundle/msi/Defguard_${{ env.VERSION }}_x64_en-US.msi
349+
path: src-tauri/target/release/bundle/msi/Defguard_${{ env.VERSION }}_${{ matrix.cpu }}_en-US.msi
341350

342351
# Signs the MSI and uploads it as release asset
343352
sign-bundle:
344353
needs:
345354
- create-release
346355
- build-windows
356+
strategy:
357+
fail-fast: false
358+
matrix:
359+
# Match CPUs from build-windows above.
360+
cpu:
361+
- x64
362+
- arm64
347363
runs-on:
348364
- self-hosted
349365
- Linux
@@ -359,13 +375,13 @@ jobs:
359375
with:
360376
name: unsigned-bundle
361377
- name: Sign bundle
362-
run: osslsigncode sign -pkcs11module /srv/codesign/certum/sc30pkcs11-3.0.6.71-MS.so -pkcs11cert ${{ secrets.CODESIGN_KEYID }} -key ${{ secrets.CODESIGN_KEYID }} -pass ${{ secrets.CODESIGN_PIN }} -h sha256 -t http://time.certum.pl/ -in Defguard_${{ env.VERSION }}_x64_en-US.msi -out Defguard-signed.msi
378+
run: osslsigncode sign -pkcs11module /srv/codesign/certum/sc30pkcs11-3.0.6.72-MS.so -pkcs11cert ${{ secrets.CODESIGN_KEYID }} -key ${{ secrets.CODESIGN_KEYID }} -pass ${{ secrets.CODESIGN_PIN }} -h sha256 -t http://time.certum.pl/ -in Defguard_${{ env.VERSION }}_${{ matrix.cpu }}_en-US.msi -out Defguard-signed.msi
363379
- name: Upload installer asset
364380
uses: actions/upload-release-asset@v1
365381
env:
366382
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
367383
with:
368384
upload_url: ${{ needs.create-release.outputs.upload_url }}
369385
asset_path: Defguard-signed.msi
370-
asset_name: Defguard_${{ env.VERSION }}_x64_en-US.msi
386+
asset_name: Defguard_${{ env.VERSION }}_${{ matrix.cpu }}_en-US.msi
371387
asset_content_type: application/octet-stream

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"file-saver": "^2.0.5",
8484
"get-text-width": "^1.0.3",
8585
"html-react-parser": "^5.2.17",
86-
"itertools": "^2.5.0",
86+
"itertools": "^2.6.0",
8787
"js-base64": "^3.7.8",
8888
"lodash-es": "^4.17.23",
8989
"merge-refs": "^2.0.0",
@@ -112,20 +112,20 @@
112112
"zustand": "^5.0.11"
113113
},
114114
"devDependencies": {
115-
"@biomejs/biome": "^2.3.13",
115+
"@biomejs/biome": "^2.4.4",
116116
"@hookform/devtools": "^4.4.0",
117117
"@svgr/cli": "^8.1.0",
118118
"@tanstack/react-query": "^5.90.21",
119119
"@tanstack/react-query-devtools": "^5.91.3",
120120
"@tauri-apps/cli": "^2.10.0",
121121
"@types/file-saver": "^2.0.7",
122122
"@types/lodash-es": "^4.17.12",
123-
"@types/node": "^24.10.13",
123+
"@types/node": "^24.11.0",
124124
"@types/react": "^19.2.14",
125125
"@types/react-dom": "^19.2.3",
126126
"@vitejs/plugin-react": "^5.1.4",
127127
"@vitejs/plugin-react-swc": "^4.2.3",
128-
"autoprefixer": "^10.4.24",
128+
"autoprefixer": "^10.4.27",
129129
"npm-run-all": "^4.1.5",
130130
"postcss": "^8.5.6",
131131
"prettier": "^3.8.1",

0 commit comments

Comments
 (0)