Skip to content

Commit 84b7228

Browse files
committed
add workflow file
1 parent 6dd4d39 commit 84b7228

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

.github/workflows/build.yaml

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+
tags:
6+
- 'app-v*'
7+
8+
jobs:
9+
publish-tauri:
10+
permissions:
11+
contents: write
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
# - platform: 'macos-latest' # for Arm based macs (M1 and above).
17+
# args: '--target aarch64-apple-darwin'
18+
# - platform: 'macos-latest' # for Intel based macs.
19+
# args: '--target x86_64-apple-darwin'
20+
# - platform: 'ubuntu-22.04'
21+
# args: ''
22+
- platform: 'ubuntu-22.04-arm' # Only available in public repos.
23+
args: ''
24+
# - platform: 'windows-latest'
25+
# args: ''
26+
27+
runs-on: ${{ matrix.platform }}
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: install dependencies (ubuntu only)
32+
if: matrix.platform == 'ubuntu-22.04-arm'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
36+
37+
- name: setup node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: lts/*
41+
cache: 'pnpm'
42+
43+
- name: install Rust stable
44+
uses: dtolnay/rust-toolchain@stable
45+
with:
46+
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
47+
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
48+
49+
- name: Rust cache
50+
uses: swatinem/rust-cache@v2
51+
with:
52+
workspaces: './src-tauri -> target'
53+
54+
- name: install frontend dependencies
55+
# If you don't have `beforeBuildCommand` configured you may want to build your frontend here too.
56+
run: pnpm install # change this to npm or pnpm depending on which one you use.
57+
58+
- uses: tauri-apps/tauri-action@v0
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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)