forked from gitify-app/gitify
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.9 KB
/
build.yml
File metadata and controls
60 lines (51 loc) · 1.9 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
name: Build
on:
workflow_call:
permissions:
contents: read
jobs:
build:
name: Build ${{ matrix.platform }} (electron-builder)
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
- 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ matrix.artifact-name }}
path: |
dist/*
!dist/*/
overwrite: true