-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (67 loc) · 2.4 KB
/
linux.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
name: Build Linux App (.deb)
on:
push:
branches:
- master
paths:
- "Cargo.desktop.toml"
- "Dioxus.toml"
- "package.json"
- "src/**"
- "common/**"
- "assets/**"
- "gen/bin/**"
# pull_request:
# branches:
# - master
workflow_dispatch:
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install development dependencies
run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libsoup-3.0-dev libwebkit2gtk-4.1-dev libxdo-dev
- name: Install Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install Bun dependencies
run: bun install --frozen-lockfile
- name: Generate TailwindCSS
run: bun build:tailwind
- name: Install Dioxus CLI
run: cargo install dioxus-cli
- name: Copy Cargo.desktop.toml
run: mv Cargo.desktop.toml Cargo.toml
- name: Create .cargo/config.toml
run: mkdir .cargo && printf "[profile.release]\nopt-level = \"z\"\ndebug = false\nlto = true\ncodegen-units = 1\npanic = \"abort\"\nstrip = true\nincremental = false\n" > .cargo/config.toml
- name: Create .env
env:
API_URL: ${{ secrets.API_URL }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_API_KEY: ${{ secrets.SUPABASE_API_KEY }}
SUPABASE_JWT_SECRET: ${{ secrets.SUPABASE_JWT_SECRET }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
run: printf "API_URL=$API_URL\nSUPABASE_URL=$SUPABASE_URL\nSUPABASE_API_KEY=$SUPABASE_API_KEY\nSUPABASE_JWT_SECRET=$SUPABASE_JWT_SECRET\nDATABASE_URL=$DATABASE_URL\n" > .env
- name: Build
run: WEBKIT_DISABLE_COMPOSITING_MODE=1 dx bundle --platform desktop --release --package deb
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: linux
# path: dist/bundle/deb/**/*
# or Upload to a release
- name: Upload to release v1.0.0
env:
GH_TOKEN: ${{ github.token }}
run: gh release upload v1.0.0 ./dist/bundle/deb/*.deb --clobber