-
-
Notifications
You must be signed in to change notification settings - Fork 93
73 lines (61 loc) · 1.97 KB
/
build-and-release-desktop-app.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
68
69
70
71
72
73
name: Build macOS App
on:
release:
types: [prereleased]
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "20.16.0"
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Download and extract libsimple
run: |
curl -L https://github.com/wangfenjin/simple/releases/latest/download/libsimple-osx-x64.zip -o libsimple.zip
unzip libsimple.zip
libsimple_dir=$(ls -d libsimple* | head -n 1)
if [ -d "$libsimple_dir" ]; then
mv "$libsimple_dir" dist-simple
else
mkdir dist-simple
mv libsimple* dist-simple/
fi
ls -R dist-simple
shell: bash
- name: Install dependencies
run: pnpm install
- name: Import Code-Signing Certificates
uses: Apple-Actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }}
p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: Build application
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: pnpm run build:desktop
- name: Build and Sign
env:
APPLEID: ${{ secrets.APPLE_ID }}
APPLEIDPASS: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APPLETEAMID: ${{ secrets.APPLE_TEAM_ID }}
CSC_LINK: ${{ secrets.MACOS_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
run: pnpm run pkg:desktop
- name: List dist-app contents
run: ls -la dist-app
- name: Update Release
uses: softprops/action-gh-release@v2
with:
files: |
dist-app/*.dmg
dist-app/*.zip
dist-app/latest*.yml
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}