-
Notifications
You must be signed in to change notification settings - Fork 108
56 lines (49 loc) · 1.38 KB
/
build.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
name: Build
'on':
push:
tags:
- v*
jobs:
build:
name: build and release electron app
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Dependencies
run: pnpm install
- name: Build Electron App
run: 'pnpm run build:desktop'
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'
- name: Cleanup Artifacts for Windows
if: matrix.os == 'windows-latest'
run: |
npx rimraf "packages/desktop/release/!(*.exe)"
- name: Cleanup Artifacts for MacOS
if: matrix.os == 'macos-latest'
run: |
npx rimraf "packages/desktop/release/!(*.dmg)"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: '${{ matrix.os }}'
path: packages/desktop/release
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: packages/desktop/release/**
env:
GITHUB_TOKEN: '${{ secrets.ACCESS_TOKEN }}'