Skip to content

Commit 820eb57

Browse files
authored
Merge pull request #4 from Human-Augment-Analytics/feature/desktop-ci-cd
ci: add desktop build CI/CD workflow
2 parents ced0b45 + c6d0f0a commit 820eb57

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build Desktop Application
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- feature/desktop-ci-cd
8+
9+
jobs:
10+
build-tauri:
11+
permissions:
12+
contents: write
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- platform: macos-latest
18+
artifact-name: macOS-dmg
19+
path: target/release/bundle/dmg/*.dmg
20+
- platform: windows-latest
21+
artifact-name: Windows-exe
22+
path: target/release/bundle/nsis/*.exe
23+
runs-on: ${{ matrix.platform }}
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: 'npm'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Setup Rust toolchain
38+
uses: dtolnay/rust-toolchain@stable
39+
40+
- name: Rust Cache
41+
uses: swatinem/rust-cache@v2
42+
with:
43+
workspaces: 'src-tauri -> target'
44+
45+
- name: Build Tauri app
46+
uses: tauri-apps/tauri-action@v0
47+
id: tauri
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
50+
with:
51+
tagName: v__VERSION__
52+
releaseName: 'App v__VERSION__'
53+
releaseBody: 'Automatic build from CI/CD pipeline'
54+
releaseDraft: true
55+
prerelease: false
56+
57+
- name: Upload Build Artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: ${{ matrix.artifact-name }}
61+
path: ${{ matrix.path }}

0 commit comments

Comments
 (0)