Skip to content

Commit 7ab487b

Browse files
author
Jiang Wenjian
committed
ci/cd pipeline to release file
1 parent 9439ebf commit 7ab487b

File tree

1 file changed

+63
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)