Skip to content

Commit e9069e5

Browse files
committed
feat: added workflow for building Tauri App
1 parent 40e5201 commit e9069e5

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/tauri-build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: "publish"
2+
3+
# This will trigger the action on each push to the `release` branch.
4+
on:
5+
push:
6+
branches:
7+
- release
8+
9+
jobs:
10+
publish-tauri:
11+
permissions:
12+
contents: write
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
platform: [macos-latest, ubuntu-20.04, windows-latest]
17+
18+
runs-on: ${{ matrix.platform }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: setup node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
27+
- name: install Rust stable
28+
uses: dtolnay/rust-toolchain@stable
29+
30+
- name: install dependencies (ubuntu only)
31+
if: matrix.platform == 'ubuntu-20.04'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
35+
36+
- name: install host's frontend dependencies
37+
run: npm run install-host-dep
38+
39+
- uses: tauri-apps/tauri-action@v0
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version
44+
releaseName: "App v__VERSION__"
45+
releaseBody: "See the assets to download this version and install."
46+
releaseDraft: true
47+
prerelease: false
48+
projectPath: "host/src-tauri"

scripts/install-host-dep.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// install-host-dep.js
2-
2+
import { runNpmCommand } from "./utils.js"
33

44
runNpmCommand('host', 'install');
55

0 commit comments

Comments
 (0)