Skip to content

Commit 13147e5

Browse files
timiclaude
authored andcommitted
feat: add Tauri CI workflow for building and releasing
- Build for macOS (Apple Silicon + x86), Windows, and Linux - Support code signing and notarization for macOS - Auto-create GitHub releases from tags Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d7c212b commit 13147e5

1 file changed

Lines changed: 179 additions & 0 deletions

File tree

.github/workflows/tauri.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
name: Build and Release Tauri App
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*'
9+
workflow_dispatch:
10+
11+
env:
12+
NODE_VERSION: '20'
13+
RUST_VERSION: '1.75'
14+
LUMIS_REPO: 'melandlabs/lumis'
15+
16+
jobs:
17+
build-tauri-macos:
18+
permissions:
19+
contents: write
20+
runs-on: macos-latest
21+
steps:
22+
- name: Checkout release repo
23+
uses: actions/checkout@v4
24+
25+
- name: Clone lumis source code
26+
run: |
27+
git clone https://github.com/${{ env.LUMIS_REPO }.git lumis
28+
cd lumis
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ env.NODE_VERSION }}
34+
cache: 'pnpm'
35+
36+
- name: Setup Rust
37+
uses: dtolnay/rust-action@stable
38+
with:
39+
toolchain: ${{ env.RUST_VERSION }}
40+
41+
- name: Install Rust targets
42+
run: |
43+
rustup target add aarch64-apple-darwin
44+
rustup target add x86_64-apple-darwin
45+
46+
- name: Install pnpm
47+
uses: pnpm/action-setup@v2
48+
with:
49+
version: 8
50+
51+
- name: Get pnpm store directory
52+
shell: bash
53+
run: |
54+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
55+
56+
- name: Setup pnpm cache
57+
uses: actions/cache@v3
58+
with:
59+
path: ${{ env.STORE_PATH }}
60+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('lumis/**/pnpm-lock.yaml') }}
61+
restore-keys: |
62+
${{ runner.os }}-pnpm-store-
63+
64+
- name: Install dependencies
65+
working-directory: ./lumis
66+
run: pnpm install --frozen-lockfile
67+
68+
- name: Build Tauri app (Apple Silicon)
69+
working-directory: ./lumis/apps/web
70+
uses: tauri-apps/tauri-action@v0
71+
env:
72+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
74+
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
75+
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
76+
APPLE_ID: ${{ secrets.APPLE_ID }}
77+
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
78+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
79+
with:
80+
tagName: v__VERSION__
81+
releaseName: 'Lumis v__VERSION__'
82+
releaseBody: 'See the assets to download this version and install.'
83+
releaseDraft: true
84+
prerelease: false
85+
args: --target aarch64-apple-darwin
86+
87+
build-tauri-windows:
88+
runs-on: windows-latest
89+
steps:
90+
- name: Checkout release repo
91+
uses: actions/checkout@v4
92+
93+
- name: Clone lumis source code
94+
run: |
95+
git clone https://github.com/${{ env.LUMIS_REPO }}.git lumis
96+
97+
- name: Setup Node.js
98+
uses: actions/setup-node@v4
99+
with:
100+
node-version: ${{ env.NODE_VERSION }}
101+
cache: 'pnpm'
102+
103+
- name: Setup Rust
104+
uses: dtolnay/rust-action@stable
105+
with:
106+
toolchain: ${{ env.RUST_VERSION }}
107+
108+
- name: Install pnpm
109+
uses: pnpm/action-setup@v2
110+
with:
111+
version: 8
112+
113+
- name: Install dependencies
114+
working-directory: ./lumis
115+
run: pnpm install --frozen-lockfile
116+
117+
- name: Build Tauri app (Windows)
118+
working-directory: ./lumis/apps/web
119+
uses: tauri-apps/tauri-action@v0
120+
env:
121+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
122+
with:
123+
tagName: v__VERSION__
124+
releaseName: 'Lumis v__VERSION__'
125+
releaseBody: 'See the assets to download this version and install.'
126+
releaseDraft: true
127+
prerelease: false
128+
129+
build-tauri-linux:
130+
runs-on: ubuntu-22.04
131+
steps:
132+
- name: Checkout release repo
133+
uses: actions/checkout@v4
134+
135+
- name: Clone lumis source code
136+
run: |
137+
git clone https://github.com/${{ env.LUMIS_REPO }}.git lumis
138+
139+
- name: Setup Node.js
140+
uses: actions/setup-node@v4
141+
with:
142+
node-version: ${{ env.NODE_VERSION }}
143+
cache: 'pnpm'
144+
145+
- name: Setup Rust
146+
uses: dtolnay/rust-action@stable
147+
with:
148+
toolchain: ${{ env.RUST_VERSION }}
149+
150+
- name: Install Rust target
151+
run: |
152+
rustup target add x86_64-unknown-linux-gnu
153+
154+
- name: Install pnpm
155+
uses: pnpm/action-setup@v2
156+
with:
157+
version: 8
158+
159+
- name: Install dependencies
160+
working-directory: ./lumis
161+
run: pnpm install --frozen-lockfile
162+
163+
- name: Install Linux build dependencies
164+
run: |
165+
sudo apt-get update
166+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
167+
168+
- name: Build Tauri app (Linux)
169+
working-directory: ./lumis/apps/web
170+
uses: tauri-apps/tauri-action@v0
171+
env:
172+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
173+
with:
174+
tagName: v__VERSION__
175+
releaseName: 'Lumis v__VERSION__'
176+
releaseBody: 'See the assets to download this version and install.'
177+
releaseDraft: true
178+
prerelease: false
179+
args: --target x86_64-unknown-linux-gnu

0 commit comments

Comments
 (0)