Skip to content

Commit 7082bfe

Browse files
committed
split the build architectures based on the runners, not in the electron builder config
1 parent 96af756 commit 7082bfe

File tree

4 files changed

+23
-65
lines changed

4 files changed

+23
-65
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'v*.*.*'
7+
78
jobs:
89
release:
910
runs-on: ${{ matrix.os }}
@@ -13,23 +14,18 @@ jobs:
1314
strategy:
1415
matrix:
1516
include:
16-
# macOS - builds universal binary (x64 + arm64)
1717
- os: macos-latest
1818
platform: mac
1919
arch: universal
20-
# Linux x64
2120
- os: ubuntu-latest
2221
platform: linux
2322
arch: x64
24-
# Linux ARM64
2523
- os: ubuntu-24.04-arm
2624
platform: linux
2725
arch: arm64
28-
# Windows x64
2926
- os: windows-latest
3027
platform: windows
3128
arch: x64
32-
# Windows ARM64 - uses native ARM64 runner
3329
- os: windows-11-arm
3430
platform: windows
3531
arch: arm64
@@ -40,7 +36,7 @@ jobs:
4036

4137
- name: Install Snapcraft
4238
uses: samuelmeuli/action-snapcraft@v2
43-
if: ${{ matrix.platform == 'linux' }}
39+
if: matrix.platform == 'linux'
4440

4541
- name: Install Node.js
4642
uses: actions/setup-node@v3
@@ -50,49 +46,30 @@ jobs:
5046
- name: Install dependencies
5147
run: npm install
5248

53-
# macOS builds both x64 and arm64, but macos-latest is arm64
54-
# Need to explicitly install x64 binary for the x64 build
5549
- name: Install macOS x64 native module
56-
if: ${{ matrix.platform == 'mac' }}
50+
if: matrix.platform == 'mac'
5751
run: npm install --save-dev @miniben90/x-win-darwin-x64 --force
5852

5953
- name: Build
6054
run: npm run build
6155

62-
# Windows: Build for specific architecture only
63-
- name: Run Electron Builder (Windows x64)
64-
if: ${{ matrix.platform == 'windows' && matrix.arch == 'x64' }}
65-
run: |
66-
npx electron-builder --windows --x64 --publish always
67-
env:
68-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
69-
70-
- name: Run Electron Builder (Windows ARM64)
71-
if: ${{ matrix.platform == 'windows' && matrix.arch == 'arm64' }}
72-
run: |
73-
npx electron-builder --windows --arm64 --publish always
56+
- name: Run Electron Builder (Windows)
57+
if: matrix.platform == 'windows'
58+
run: npx electron-builder --windows --${{ matrix.arch }} --publish always
7459
env:
7560
GH_TOKEN: ${{ secrets.GH_TOKEN }}
7661

77-
- name: Run Electron Builder (Linux x64)
78-
if: ${{ matrix.platform == 'linux' && matrix.arch == 'x64' }}
79-
run: |
80-
npx electron-builder --linux --x64 --publish always
81-
env:
82-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
83-
84-
- name: Run Electron Builder (Linux ARM64)
85-
if: ${{ matrix.platform == 'linux' && matrix.arch == 'arm64' }}
86-
run: |
87-
npx electron-builder --linux --arm64 --publish always
62+
- name: Run Electron Builder (Linux)
63+
if: matrix.platform == 'linux'
64+
run: npx electron-builder --linux --${{ matrix.arch }} --publish always
8865
env:
8966
GH_TOKEN: ${{ secrets.GH_TOKEN }}
9067

9168
- name: Run Electron Builder (macOS)
92-
if: ${{ matrix.platform == 'mac' }}
69+
if: matrix.platform == 'mac'
9370
run: |
9471
echo "$API_KEY" > apple.p8
95-
npx electron-builder --mac --publish always
72+
npx electron-builder --mac --universal --publish always
9673
env:
9774
GH_TOKEN: ${{ secrets.GH_TOKEN }}
9875
CSC_LINK: ${{ secrets.MAC_CERTS }}

electron-builder.yml

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ protocols:
2727
win:
2828
executableName: solidtime
2929
target:
30-
- target: nsis
31-
arch:
32-
- x64
33-
- arm64
30+
- nsis
3431
nsis:
3532
include: build/installer.nsh
3633
artifactName: ${name}-setup-${arch}.${ext}
@@ -39,11 +36,7 @@ nsis:
3936
createDesktopShortcut: always
4037
mac:
4138
entitlementsInherit: build/entitlements.mac.plist
42-
target:
43-
target: default
44-
arch:
45-
- x64
46-
- arm64
39+
target: default
4740
extendInfo:
4841
- NSCameraUsageDescription: Application requests access to the device's camera.
4942
- NSMicrophoneUsageDescription: Application requests access to the device's microphone.
@@ -58,22 +51,10 @@ linux:
5851
icon: build/icon.icns
5952
executableName: solidtime
6053
target:
61-
- target: deb
62-
arch:
63-
- x64
64-
- arm64
65-
- target: snap
66-
arch:
67-
- x64
68-
- arm64
69-
- target: tar.gz
70-
arch:
71-
- x64
72-
- arm64
73-
- target: rpm
74-
arch:
75-
- x64
76-
- arm64
54+
- deb
55+
- snap
56+
- tar.gz
57+
- rpm
7758
desktop:
7859
entry:
7960
Name: solidtime
@@ -83,9 +64,9 @@ linux:
8364
mimeTypes:
8465
- x-scheme-handler/solidtime
8566
rpm:
86-
fpm:
87-
- --rpm-rpmbuild-define
88-
- _build_id_links none
67+
fpm:
68+
- --rpm-rpmbuild-define
69+
- _build_id_links none
8970
appImage:
9071
artifactName: ${name}.${ext}
9172
npmRebuild: true

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.62-beta",
3+
"version": "0.0.63-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)