Skip to content

Commit c8f6fd5

Browse files
committed
build windows arm application on windows-11-arm runner
1 parent c79843a commit c8f6fd5

File tree

3 files changed

+30
-19
lines changed

3 files changed

+30
-19
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,23 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
os: [macos-latest, ubuntu-latest, windows-latest]
1615
include:
16+
# macOS - builds universal binary (x64 + arm64)
1717
- os: macos-latest
1818
platform: mac
19+
arch: universal
20+
# Linux x64
1921
- os: ubuntu-latest
2022
platform: linux
23+
arch: x64
24+
# Windows x64
2125
- os: windows-latest
2226
platform: windows
27+
arch: x64
28+
# Windows ARM64 - uses native ARM64 runner
29+
- os: windows-11-arm
30+
platform: windows
31+
arch: arm64
2332

2433
steps:
2534
- name: Check out Git repository
@@ -37,25 +46,27 @@ jobs:
3746
- name: Install dependencies
3847
run: npm install
3948

40-
- name: Install all Windows native modules for cross-arch build
41-
if: ${{ matrix.platform == 'windows' }}
42-
run: npm install --save-dev @miniben90/x-win-win32-x64-msvc @miniben90/x-win-win32-arm64-msvc --force
43-
44-
- name: Install all macOS native modules for cross-arch build
49+
# macOS builds both x64 and arm64, but macos-latest is arm64
50+
# Need to explicitly install x64 binary for the x64 build
51+
- name: Install macOS x64 native module
4552
if: ${{ matrix.platform == 'mac' }}
46-
run: npm install --save-dev @miniben90/x-win-darwin-arm64 @miniben90/x-win-darwin-x64 @miniben90/x-win-darwin-universal --force
47-
48-
- name: Install all Linux native modules for cross-arch build
49-
if: ${{ matrix.platform == 'linux' }}
50-
run: npm install --save-dev @miniben90/x-win-linux-x64-gnu @miniben90/x-win-linux-arm64-gnu --force
53+
run: npm install --save-dev @miniben90/x-win-darwin-x64 --force
5154

5255
- name: Build
5356
run: npm run build
5457

55-
- name: Run Electron Builder (Windows)
56-
if: ${{ matrix.platform == 'windows' }}
58+
# Windows: Build for specific architecture only
59+
- name: Run Electron Builder (Windows x64)
60+
if: ${{ matrix.platform == 'windows' && matrix.arch == 'x64' }}
61+
run: |
62+
npx electron-builder --windows --x64 --publish always
63+
env:
64+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
65+
66+
- name: Run Electron Builder (Windows ARM64)
67+
if: ${{ matrix.platform == 'windows' && matrix.arch == 'arm64' }}
5768
run: |
58-
npx electron-builder --windows --publish always
69+
npx electron-builder --windows --arm64 --publish always
5970
env:
6071
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6172

@@ -66,11 +77,11 @@ jobs:
6677
env:
6778
GH_TOKEN: ${{ secrets.GH_TOKEN }}
6879

69-
- name: Run Electron Builder
80+
- name: Run Electron Builder (macOS)
7081
if: ${{ matrix.platform == 'mac' }}
7182
run: |
7283
echo "$API_KEY" > apple.p8
73-
npx electron-builder --${{ matrix.platform }} --publish always
84+
npx electron-builder --mac --publish always
7485
env:
7586
GH_TOKEN: ${{ secrets.GH_TOKEN }}
7687
CSC_LINK: ${{ secrets.MAC_CERTS }}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "solidtime",
3-
"version": "0.0.54-beta",
3+
"version": "0.0.55-beta",
44
"description": "Desktop App for solidtime - the modern open-source time tracker",
55
"main": "./out/main/index.js",
66
"author": "solidtime.io",

0 commit comments

Comments
 (0)