forked from different-ai/openwork
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (95 loc) · 3.17 KB
/
Copy pathbuild-electron-desktop.yml
File metadata and controls
114 lines (95 loc) · 3.17 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build Electron Desktop
on:
workflow_dispatch:
push:
branches:
- electron-notary-test
paths:
- apps/app/**
- apps/desktop/**
- packages/ui/**
- constants.json
- pnpm-lock.yaml
- package.json
- .github/workflows/build-electron-desktop.yml
jobs:
build-electron:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
artifact: macos
- os: ubuntu-latest
artifact: linux
- os: windows-latest
artifact: windows
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
# pnpm must be installed BEFORE setup-node so setup-node can find the
# pnpm binary on PATH. Matches the pattern in build-desktop.yml so
# the two workflows share the same bootstrap story.
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11.4.0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Package Electron desktop (unpacked)
run: pnpm --filter @openwork/desktop package:electron:dir
- name: Upload Electron artifacts
uses: actions/upload-artifact@v4
with:
name: openwork-electron-${{ matrix.artifact }}
path: apps/desktop/dist-electron/**
electron-macos-notarization-smoke:
name: Electron macOS notarization smoke
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11.4.0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Write notary API key
env:
APPLE_NOTARY_API_KEY_P8_BASE64: ${{ secrets.APPLE_NOTARY_API_KEY_P8_BASE64 }}
run: |
set -euo pipefail
NOTARY_KEY_PATH="$RUNNER_TEMP/AuthKey.p8"
printf '%s' "$APPLE_NOTARY_API_KEY_P8_BASE64" | base64 --decode > "$NOTARY_KEY_PATH"
chmod 600 "$NOTARY_KEY_PATH"
echo "NOTARY_KEY_PATH=$NOTARY_KEY_PATH" >> "$GITHUB_ENV"
- name: Package Electron desktop (signed + notarized, no publish)
env:
CSC_LINK: ${{ secrets.APPLE_CODESIGN_CERT_P12_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CODESIGN_CERT_PASSWORD }}
MACOS_NOTARIZE: true
APPLE_API_KEY: ${{ secrets.APPLE_NOTARY_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_NOTARY_API_ISSUER_ID }}
APPLE_API_KEY_PATH: ${{ env.NOTARY_KEY_PATH }}
run: |
set -euo pipefail
pnpm --filter @openwork/desktop run build:electron
pnpm --dir apps/desktop exec electron-builder --config electron-builder.yml --mac dmg zip --publish never