-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (49 loc) · 1.41 KB
/
main.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
name: Build cambia
on:
workflow_dispatch:
jobs:
npm:
name: Build frontend
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
- name: Install dependencies
run: npm install
working-directory: web
- name: Generate the static site
run: npm run build
working-directory: web
- name: Upload static site files
uses: actions/upload-artifact@v4
with:
name: webui-${{ matrix.os }}
path: web/build
cargo:
name: Build binaries
needs: npm
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Download static site files
uses: actions/download-artifact@v4
with:
name: webui-${{ matrix.os }}
path: web/build
- uses: dtolnay/rust-toolchain@stable
- name: Build w/ experimental rippers
run: cargo build --release --features experimental_rippers
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: cambia-${{ matrix.os }}
path: target/release/cambia${{ matrix.os == 'windows-latest' && '.exe' || '' }}