-
Notifications
You must be signed in to change notification settings - Fork 57
71 lines (60 loc) · 2.02 KB
/
build.yaml
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
name: Build
on:
push:
workflow_call:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
# MacOS (Intel)
- platform: macos-latest
target: x86_64-apple-darwin
# MacOS (Apple Silicon)
- platform: macos-latest
target: aarch64-apple-darwin
# 64-bit Linux
- platform: ubuntu-22.04
target: x86_64-unknown-linux-gnu
# 64-bit Windows
- platform: windows-latest
target: x86_64-pc-windows-msvc
# 32-bit Windows
- platform: windows-latest
target: i686-pc-windows-msvc
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.14.1
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: |
rustup toolchain install stable --profile minimal --target ${{ matrix.settings.target }}
rustup default stable
- uses: swatinem/rust-cache@988c164c3d0e93c4dbab36aaf5bbeb77425b2894
with:
workspaces: packages/desktop
- name: Install dependencies (Ubuntu)
if: matrix.settings.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: pnpm i
- run: |
pnpm build --filter zebar --filter @zebar/client
pnpm build --filter @zebar/desktop -- -- --target ${{ matrix.settings.target }}
- uses: actions/upload-artifact@v3
with:
name: bundle-${{ matrix.settings.target }}
path: |
packages/desktop/target/release/bundle/**/*.AppImage
packages/desktop/target/release/bundle/**/*.dmg
packages/desktop/target/release/bundle/**/*.deb
packages/desktop/target/release/bundle/**/*.msi