-
-
Notifications
You must be signed in to change notification settings - Fork 13
71 lines (61 loc) · 1.92 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_app:
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
# using the default — we can bust the cache by changing this
prefix-key: "v0-rust"
workspaces: "src-tauri"
- name: (Ubuntu only) Install dependencies
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install node packages
run: bun install
- name: List installed versions
run: |
bun --verison;
cargo --version;
bun tauri --version
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tauriScript: bun tauri
- name: (Ubuntu only) Upload build artifacts
if: matrix.platform == 'ubuntu-22.04'
uses: actions/upload-artifact@v4
with:
name: linux-deb-and-appimage
path: |
src-tauri/target/release/bundle/deb/citadel_0.1.0_amd64.deb
src-tauri/target/release/bundle/appimage/citadel_0.1.0_amd64.AppImage
- name: (macOS only) Upload build artifacts
if: matrix.platform == 'macos-12'
uses: actions/upload-artifact@v4
with:
name: macos-app-and-dmg
path: |
src-tauri/target/release/bundle/macos/Citadel.app
src-tauri/target/release/bundle/dmg/Citadel_0.1.0_x64.dmg