Skip to content

Commit a3c5f6d

Browse files
committed
refactor: electron-builder workflow
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent bcfd0b9 commit a3c5f6d

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ jobs:
4242
- name: Package for ${{ matrix.platform }}
4343
run: ${{ matrix.package-cmd }}
4444
env:
45-
# For macOS
46-
CSC_LINK: ${{ secrets.CSC_LINK }}
47-
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
45+
# Signing certificates - important to use the correct cert per platform
46+
CSC_LINK: ${{ matrix.platform == 'macOS' && secrets.CSC_LINK || (matrix.platform == 'windows' && secrets.WIN_CSC_LINK || '') }}
47+
CSC_KEY_PASSWORD: ${{ matrix.platform == 'macOS' && secrets.CSC_KEY_PASSWORD || (matrix.platform == 'windows' && secrets.WIN_CSC_KEY_PASSWORD || '') }}
4848

4949
- name: Clean up builds
5050
shell: bash
@@ -54,5 +54,7 @@ jobs:
5454
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5555
with:
5656
name: ${{ matrix.artifact-name }}
57-
path: dist/
57+
path: |
58+
dist/*
59+
!dist/*/
5860
overwrite: true

.github/workflows/publish.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,22 @@ jobs:
4545
- name: Package and publish for ${{ matrix.platform }}
4646
run: ${{ matrix.package-cmd }}
4747
env:
48-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
# For macOS
48+
# Signing certificates - important to use the correct cert per platform
49+
CSC_LINK: ${{ matrix.platform == 'macOS' && secrets.CSC_LINK || (matrix.platform == 'windows' && secrets.WIN_CSC_LINK || '') }}
50+
CSC_KEY_PASSWORD: ${{ matrix.platform == 'macOS' && secrets.CSC_KEY_PASSWORD || (matrix.platform == 'windows' && secrets.WIN_CSC_KEY_PASSWORD || '') }}
51+
# macOS specific
5052
APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }}
5153
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
5254
APPLE_ID_TEAM_ID: ${{ secrets.APPLE_ID_TEAM_ID }}
53-
CSC_LINK: ${{ secrets.CSC_LINK }}
54-
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
5555
NOTARIZE: ${{ matrix.use-apple-notarization }}
56+
# General
57+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5658

5759
- name: Upload artifacts
5860
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
5961
with:
6062
name: ${{ matrix.artifact-name }}
61-
path: dist/
63+
path: |
64+
dist/*
65+
!dist/*/
6266
overwrite: true

config/electron-builder.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const config = {
55
productName: 'Gitify',
66
appId: 'com.electron.gitify',
7-
copyright: 'Copyright © 2025 Gitify Team',
7+
copyright: 'Copyright © 2026 Gitify Team',
88
asar: true,
99
files: [
1010
'assets/images/*',
@@ -41,7 +41,12 @@ const config = {
4141
sign: false,
4242
},
4343
win: {
44-
target: 'nsis',
44+
target: [
45+
{
46+
target: 'nsis',
47+
arch: ['x64'],
48+
},
49+
],
4550
icon: 'assets/images/app-icon.ico',
4651
},
4752
nsis: {

0 commit comments

Comments
 (0)