Skip to content

Commit 36bda76

Browse files
committed
add .github
1 parent ddd3b98 commit 36bda76

File tree

1 file changed

+67
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)