-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (77 loc) · 2.35 KB
/
build-app.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: build stream uploader
on:
push:
branches:
- main
paths:
- "stream-uploader/**"
pull_request:
branches:
- main
paths:
- "stream-uploader/**"
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
defaults:
run:
working-directory: stream-uploader
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Setup Yarn
run: corepack enable yarn
- name: Cache Yarn dependencies
uses: actions/cache@v4
with:
path: |
stream-uploader/node_modules
~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
with:
workspaces: stream-uploader/src-tauri
- name: Install dependencies (macOS)
if: matrix.platform == 'macos-latest'
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Install frontend dependencies
run: yarn install --frozen-lockfile
- name: Build frontend
run: yarn build
- name: Build the app (macOS)
if: matrix.platform == 'macos-latest'
run: |
yarn tauri build -- --target universal-apple-darwin
- name: Build the app (Windows)
if: matrix.platform == 'windows-latest'
run: yarn tauri build
- name: Upload artifacts (macOS)
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: stream-uploader-macos
path: |
target/universal-apple-darwin/release/bundle/dmg/*.dmg
target/universal-apple-darwin/release/bundle/macos/*.app
- name: Upload artifacts (Windows)
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: stream-uploader-windows
path: |
target/release/bundle/msi/*_x64_en-US.msi
target/release/bundle/nsis/*_x64-setup.exe