-
-
Notifications
You must be signed in to change notification settings - Fork 9
67 lines (57 loc) · 1.97 KB
/
desktop.yml
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
name: Desktop
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
app:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- name: Chocolatey Install Action
if: ${{ matrix.os == 'windows-latest' }}
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install python2 visualcpp-build-tools -y
- name: Add msbuild to PATH
if: matrix.os == 'windows-latest'
uses: microsoft/[email protected]
- name: Yarn build
run: yarn && yarn build && yarn build:dist && cd build-dist && yarn
- run: mkdir ~/.private_keys && echo "$APPLE_NOTARIZE_KEY" > ~/.private_keys/AuthKey_5VH6PQ3585.p8
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
env:
APPLE_NOTARIZE_KEY: ${{secrets.APPLE_NOTARIZE_KEY}}
- name: Build Desktop
run: yarn build && yarn dist
working-directory: ./desktop/main
env:
NODE_ENV: production
USE_HARD_LINKS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ matrix.os == 'windows-latest' && secrets.WIN_CSC_LINK || secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ matrix.os == 'windows-latest' && secrets.WIN_CSC_KEY_PASSWORD || secrets.CSC_KEY_PASSWORD }}
- name: Upload App
if: startsWith(github.ref, 'refs/tags/v') == false || failure()
uses: actions/upload-artifact@v3
with:
name: desktop-${{ matrix.os }}
path: |
./build/desktop/main/dist/*.AppImage
./build/desktop/main/dist/*.dmg
./build/desktop/main/dist/*.exe
retention-days: 1