-
-
Notifications
You must be signed in to change notification settings - Fork 2
161 lines (135 loc) · 4.25 KB
/
Copy pathpush.yml
File metadata and controls
161 lines (135 loc) · 4.25 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Electron Forge CI/CD
on:
push:
tags:
- "*"
branches:
- main
- develop
pull_request:
branches: [main, develop]
merge_group:
workflow_dispatch:
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
env:
CI: true
DEBUG: "*"
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64, arm64]
exclude:
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js 22.5.1
uses: actions/setup-node@v4
with:
node-version: "22.5.1"
cache: "pnpm"
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: pnpm install
- name: rebuild
run: npm rebuild
- name: Import Apple Code Signing Certificate
uses: apple-actions/import-codesign-certs@v3
if: matrix.os == 'macos-latest'
with:
p12-file-base64: ${{ secrets.CERTIFICATE_OSX_APPLICATION }}
p12-password: ${{ secrets.CERTIFICATE_OSX_APPLICATION_PASSWORD }}
- name: Verify certificates
if: matrix.os == 'macos-latest'
run: |
security find-identity -v -p codesigning
codesign --verify --verbose /Applications/Xcode.app
- name: Package application
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
SUPABASE_PROJECT_ID: ${{ secrets.SUPABASE_PROJECT_ID }}
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: pnpm electron-forge publish --dry-run --arch ${{ matrix.arch }}
- name: Disable AppArmor restriction
if: matrix.os == 'ubuntu-latest'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Run tests
uses: coactions/setup-xvfb@v1
continue-on-error: true
with:
run: pnpm test:e2e:raw
- name: Upload Playwright artifacts
uses: actions/upload-artifact@v4
continue-on-error: true
with:
name: ${{ matrix.os }}-playwright
path: playwright/**/*
- name: windows workaround
if: matrix.os == 'windows-latest'
run: rd -r "out/Pipelab-win32-x64/resources/app/node_modules"
- name: Upload artifacts
if: success()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}-${{ matrix.arch }}-out
path: out/**/*
release:
permissions:
contents: write
discussions: write
needs: build-and-test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64, arm64]
exclude:
- os: ubuntu-latest
arch: arm64
- os: windows-latest
arch: arm64
if: |
!cancelled() &&
(startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch')
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v5
with:
name: artifact-${{ matrix.os }}-${{ matrix.arch }}-out
path: out
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- name: Use Node.js 22.5.1
uses: actions/setup-node@v4
with:
node-version: "22.5.1"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --prod=false
- name: windows workaround
if: matrix.os == 'windows-latest'
run: cd out/Pipelab-win32-x64/resources/app && pnpm i
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm electron-forge publish --from-dry-run