@@ -3,175 +3,180 @@ name: CI Build Check
33on :
44 push :
55 branches :
6- - main
6+ - main
77 pull_request :
88 branches :
9- - main
9+ - main
1010
1111jobs :
1212 # Web Build Check
1313 build-web :
1414 runs-on : ubuntu-latest
1515 steps :
16- - name : Checkout repository
17- uses : actions/checkout@v4
18-
19- - name : Setup Bun
20- uses : oven-sh/setup-bun@v2
21- with :
22- bun-version : latest
23-
24- - name : Cache Bun dependencies
25- uses : actions/cache@v4
26- with :
27- path : |
28- ~/.bun/install/cache
29- node_modules
30- packages/*/node_modules
31- key : ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb', '**/package.json') }}
32- restore-keys : |
33- ${{ runner.os }}-bun-
34-
35- - name : Cache Next.js
36- uses : actions/cache@v4
37- with :
38- path : |
39- packages/web/.next/cache
40- key : ${{ runner.os }}-nextjs-web-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/**/*.ts', 'packages/**/*.tsx') }}
41- restore-keys : |
42- ${{ runner.os }}-nextjs-web-
43-
44- - name : Install dependencies
45- run : bun install
46-
47- - name : Build Web app
48- run : bun run build:web
49-
50- - name : Upload Web artifacts
51- uses : actions/upload-artifact@v4
52- with :
53- name : web-build
54- path : packages/web/out
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Bun
20+ uses : oven-sh/setup-bun@v2
21+ with :
22+ bun-version : latest
23+
24+ - name : Cache Bun dependencies
25+ uses : actions/cache@v4
26+ with :
27+ path : |
28+ ~/.bun/install/cache
29+ node_modules
30+ packages/*/node_modules
31+ key : ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb', '**/package.json') }}
32+ restore-keys : |
33+ ${{ runner.os }}-bun-
34+
35+ - name : Cache Next.js
36+ uses : actions/cache@v4
37+ with :
38+ path : |
39+ packages/web/.next/cache
40+ key : ${{ runner.os }}-nextjs-web-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/**/*.ts', 'packages/**/*.tsx') }}
41+ restore-keys : |
42+ ${{ runner.os }}-nextjs-web-
43+
44+ - name : Install dependencies
45+ run : bun install
46+
47+ - name : Build Web app
48+ run : bun run build:web
49+
50+ - name : Upload Web artifacts
51+ uses : actions/upload-artifact@v4
52+ with :
53+ name : web-build
54+ path : packages/web/out
5555
5656 # Desktop Build Check
5757 build-desktop :
5858 strategy :
5959 fail-fast : false
6060 matrix :
6161 include :
62- - platform : " macos-latest"
63- build_script : " package:mac"
64- - platform : " windows-latest"
65- build_script : " package:win"
66- - platform : " ubuntu-22.04"
67- build_script : " package:linux"
62+ - platform : " macos-latest"
63+ build_script : " package:mac"
64+ - platform : " windows-latest"
65+ build_script : " package:win"
66+ - platform : " ubuntu-22.04"
67+ build_script : " package:linux"
6868
6969 runs-on : ${{ matrix.platform }}
7070 steps :
71- - name : Checkout repository
72- uses : actions/checkout@v4
73-
74- - name : Setup Bun
75- uses : oven-sh/setup-bun@v2
76- with :
77- bun-version : latest
78-
79- - name : Cache Bun dependencies
80- uses : actions/cache@v4
81- with :
82- path : |
83- ~/.bun/install/cache
84- node_modules
85- packages/*/node_modules
86- key : ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb', '**/package.json') }}
87- restore-keys : |
88- ${{ runner.os }}-bun-
89-
90- - name : Cache Next.js
91- uses : actions/cache@v4
92- with :
93- path : |
94- packages/desktop/.next/cache
95- key : ${{ runner.os }}-nextjs-desktop-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/**/*.ts', 'packages/**/*.tsx') }}
96- restore-keys : |
97- ${{ runner.os }}-nextjs-desktop-
98-
99- - name : Cache Webpack
100- uses : actions/cache@v4
101- with :
102- path : |
103- packages/desktop/build
104- packages/desktop/.erb
105- key : ${{ runner.os }}-webpack-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/desktop/electron/**/*.ts') }}
106- restore-keys : |
107- ${{ runner.os }}-webpack-
108-
109- - name : Cache electron-builder
110- uses : actions/cache@v4
111- with :
112- path : |
113- ~/Library/Caches/electron
114- ~/Library/Caches/electron-builder
115- ~/.cache/electron
116- ~/.cache/electron-builder
117- ~/AppData/Local/electron/Cache
118- ~/AppData/Local/electron-builder/Cache
119- key : ${{ runner.os }}-electron-${{ hashFiles('**/bun.lockb') }}
120- restore-keys : |
121- ${{ runner.os }}-electron-
122-
123- - name : Install dependencies
124- run : bun install
125-
126- - name : Import Code-Signing Certificates (macOS)
127- if : matrix.platform == 'macos-latest' && env.APPLE_CERTIFICATE != ''
128- env :
129- APPLE_CERTIFICATE : ${{ secrets.APPLE_CERTIFICATE }}
130- uses : apple-actions/import-codesign-certs@v3
131- with :
132- p12-file-base64 : ${{ secrets.APPLE_CERTIFICATE }}
133- p12-password : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
134-
135- - name : Install Linux dependencies
136- if : matrix.platform == 'ubuntu-22.04'
137- run : |
138- sudo apt-get update
139- sudo apt-get install -y rpm
140-
141- - name : Build Desktop app
142- env :
143- APPLE_ID : ${{ secrets.APPLE_ID }}
144- APPLE_APP_SPECIFIC_PASSWORD : ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
145- APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
146- CSC_LINK : ${{ secrets.APPLE_CERTIFICATE }}
147- CSC_KEY_PASSWORD : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
148- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
149- run : bun run ${{ matrix.build_script }}
150-
151- - name : Upload artifacts (macOS)
152- if : matrix.platform == 'macos-latest'
153- uses : actions/upload-artifact@v4
154- with :
155- name : macos-app
156- path : |
157- packages/desktop/dist/*.dmg
158- packages/desktop/dist/*.zip
159- packages/desktop/dist/*.blockmap
160-
161- - name : Upload artifacts (Windows)
162- if : matrix.platform == 'windows-latest'
163- uses : actions/upload-artifact@v4
164- with :
165- name : windows-app
166- path : |
167- packages/desktop/dist/*.exe
168- packages/desktop/dist/*.blockmap
169-
170- - name : Upload artifacts (Linux)
171- if : matrix.platform == 'ubuntu-22.04'
172- uses : actions/upload-artifact@v4
173- with :
174- name : linux-app
175- path : |
176- packages/desktop/dist/*.AppImage
177- packages/desktop/dist/*.blockmap
71+ - name : Checkout repository
72+ uses : actions/checkout@v4
73+
74+ - name : Setup Node.js
75+ uses : actions/setup-node@v4
76+ with :
77+ node-version : latest
78+
79+ - name : Setup Bun
80+ uses : oven-sh/setup-bun@v2
81+ with :
82+ bun-version : latest
83+
84+ - name : Cache Bun dependencies
85+ uses : actions/cache@v4
86+ with :
87+ path : |
88+ ~/.bun/install/cache
89+ node_modules
90+ packages/*/node_modules
91+ key : ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb', '**/package.json') }}
92+ restore-keys : |
93+ ${{ runner.os }}-bun-
94+
95+ - name : Cache Next.js
96+ uses : actions/cache@v4
97+ with :
98+ path : |
99+ packages/desktop/.next/cache
100+ key : ${{ runner.os }}-nextjs-desktop-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/**/*.ts', 'packages/**/*.tsx') }}
101+ restore-keys : |
102+ ${{ runner.os }}-nextjs-desktop-
103+
104+ - name : Cache Webpack
105+ uses : actions/cache@v4
106+ with :
107+ path : |
108+ packages/desktop/build
109+ packages/desktop/.erb
110+ key : ${{ runner.os }}-webpack-${{ hashFiles('**/bun.lockb') }}-${{ hashFiles('packages/desktop/electron/**/*.ts') }}
111+ restore-keys : |
112+ ${{ runner.os }}-webpack-
113+
114+ - name : Cache electron-builder
115+ uses : actions/cache@v4
116+ with :
117+ path : |
118+ ~/Library/Caches/electron
119+ ~/Library/Caches/electron-builder
120+ ~/.cache/electron
121+ ~/.cache/electron-builder
122+ ~/AppData/Local/electron/Cache
123+ ~/AppData/Local/electron-builder/Cache
124+ key : ${{ runner.os }}-electron-${{ hashFiles('**/bun.lockb') }}
125+ restore-keys : |
126+ ${{ runner.os }}-electron-
127+
128+ - name : Install dependencies
129+ run : bun install
130+
131+ - name : Import Code-Signing Certificates (macOS)
132+ if : matrix.platform == 'macos-latest' && env.APPLE_CERTIFICATE != ''
133+ env :
134+ APPLE_CERTIFICATE : ${{ secrets.APPLE_CERTIFICATE }}
135+ uses : apple-actions/import-codesign-certs@v3
136+ with :
137+ p12-file-base64 : ${{ secrets.APPLE_CERTIFICATE }}
138+ p12-password : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
139+
140+ - name : Install Linux dependencies
141+ if : matrix.platform == 'ubuntu-22.04'
142+ run : |
143+ sudo apt-get update
144+ sudo apt-get install -y rpm
145+
146+ - name : Build Desktop app
147+ env :
148+ APPLE_ID : ${{ secrets.APPLE_ID }}
149+ APPLE_APP_SPECIFIC_PASSWORD : ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
150+ APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
151+ CSC_LINK : ${{ secrets.APPLE_CERTIFICATE }}
152+ CSC_KEY_PASSWORD : ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
153+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
154+ run : bun run ${{ matrix.build_script }}
155+
156+ - name : Upload artifacts (macOS)
157+ if : matrix.platform == 'macos-latest'
158+ uses : actions/upload-artifact@v4
159+ with :
160+ name : macos-app
161+ path : |
162+ packages/desktop/dist/*.dmg
163+ packages/desktop/dist/*.zip
164+ packages/desktop/dist/*.blockmap
165+
166+ - name : Upload artifacts (Windows)
167+ if : matrix.platform == 'windows-latest'
168+ uses : actions/upload-artifact@v4
169+ with :
170+ name : windows-app
171+ path : |
172+ packages/desktop/dist/*.exe
173+ packages/desktop/dist/*.blockmap
174+
175+ - name : Upload artifacts (Linux)
176+ if : matrix.platform == 'ubuntu-22.04'
177+ uses : actions/upload-artifact@v4
178+ with :
179+ name : linux-app
180+ path : |
181+ packages/desktop/dist/*.AppImage
182+ packages/desktop/dist/*.blockmap
0 commit comments