Skip to content

Commit 25279eb

Browse files
committed
Fix CI again
1 parent 23ea42f commit 25279eb

File tree

2 files changed

+70
-3
lines changed

2 files changed

+70
-3
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
pull_request:
88
branches:
99
- main
10-
release:
11-
types:
12-
- created
1310

1411
jobs:
1512
build:
@@ -19,6 +16,16 @@ jobs:
1916
- uses: actions/checkout@v4
2017
- uses: oven-sh/setup-bun@v2
2118

19+
- name: Install Rust stable
20+
uses: dtolnay/rust-toolchain@stable
21+
22+
- name: Install dependencies
23+
run: |
24+
sudo apt-get update
25+
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
26+
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
27+
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
28+
2229
- run: bun install
2330

2431
- run: bun run tauri:build

.github/workflows/publish.yaml

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

0 commit comments

Comments
 (0)