-
Notifications
You must be signed in to change notification settings - Fork 285
75 lines (66 loc) · 2.23 KB
/
build.yml
File metadata and controls
75 lines (66 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build
on:
workflow_call:
secrets:
OAUTH_CLIENT_ID:
required: true
# Signing certificates
CSC_LINK:
required: true
WIN_CSC_LINK:
required: true
CSC_KEY_PASSWORD:
required: true
WIN_CSC_KEY_PASSWORD:
required: true
permissions: {}
jobs:
build:
name: Build ${{ matrix.platform }} [electron-builder]
permissions:
contents: read
strategy:
matrix:
include:
- os: macos-latest
platform: macOS
package-cmd: pnpm package:macos --publish=never -c.mac.identity=null
cleanup-path: dist/mac-universal
artifact-name: Gitify-dist-mac
- os: windows-latest
platform: Windows
package-cmd: pnpm package:win --publish=never
cleanup-path: dist/win-unpacked
artifact-name: Gitify-dist-win
- os: ubuntu-latest
platform: Linux
package-cmd: pnpm package:linux --publish=never
cleanup-path: dist/linux-unpacked
artifact-name: Gitify-dist-linux
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build application
run: pnpm build
- name: Package for ${{ matrix.platform }}
run: ${{ matrix.package-cmd }}
env:
# Signing certificates - important to use the correct cert per platform
CSC_LINK: ${{ matrix.platform == 'macOS' && secrets.CSC_LINK || (matrix.platform == 'windows' && secrets.WIN_CSC_LINK || '') }}
CSC_KEY_PASSWORD: ${{ matrix.platform == 'macOS' && secrets.CSC_KEY_PASSWORD || (matrix.platform == 'windows' && secrets.WIN_CSC_KEY_PASSWORD || '') }}
- name: Clean up builds
shell: bash
run: rm -rfv ${{ matrix.cleanup-path }}
- name: Upload artifacts
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ matrix.artifact-name }}
path: |
dist/*
!dist/*/
overwrite: true