Skip to content

Commit bafe74e

Browse files
committed
Github workflow
Github workflow pnpm Updated github action needs Updated build yml Updated workflow Removed workflow dependency Updated workflow Updated github workflow Allow write in workflow Updated working dir for rust cache Updated rust cache workspace target Updated workflow for ubuntu
1 parent 5b72065 commit bafe74e

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: "publish"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
v1:
10+
permissions:
11+
contents: write
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- platform: "macos-latest"
17+
args: "--verbose --target universal-apple-darwin"
18+
- platform: "ubuntu-20.04"
19+
args: "--verbose"
20+
- platform: "windows-latest"
21+
args: "--verbose"
22+
23+
runs-on: ${{ matrix.platform }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
# node
28+
- name: install pnpm
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: 9.x.x
32+
33+
- name: setup node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: lts/*
37+
cache: pnpm
38+
39+
# rust
40+
- name: install Rust stable
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
44+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
45+
46+
- name: install dependencies (ubuntu only)
47+
if: matrix.platform == 'ubuntu-20.04' # This must match the platform value defined above.
48+
run: |
49+
sudo apt-get update
50+
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
51+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
52+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
53+
54+
- name: install frontend dependencies
55+
run: pnpm install # change this to npm, pnpm or bun depending on which one you use.
56+
57+
- name: Rust cache
58+
uses: Swatinem/rust-cache@v2
59+
with:
60+
workspaces: ./src-tauri
61+
62+
- uses: tauri-apps/tauri-action@v0
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
with:
66+
tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version.
67+
releaseName: "App v__VERSION__"
68+
releaseBody: "See the assets to download this version and install."
69+
releaseDraft: true
70+
prerelease: false
71+
args: ${{ matrix.args }}

src-tauri/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,10 @@ filesize = "0.2.0" # or "postgres", or "mysql"
2929
[features]
3030
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
3131
custom-protocol = ["tauri/custom-protocol"]
32+
33+
[profile.release]
34+
panic = "abort" # Strip expensive panic clean-up logic
35+
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
36+
lto = true # Enables link to optimizations
37+
opt-level = "s" # Optimize for binary size
38+
strip = true # Remove debug symbols

0 commit comments

Comments
 (0)