Skip to content

Commit 5d0fcb4

Browse files
committed
Updated workflow
1 parent af3c83d commit 5d0fcb4

File tree

1 file changed

+69
-36
lines changed

1 file changed

+69
-36
lines changed

.github/workflows/build-from-master.yml

Lines changed: 69 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,98 @@ on:
66
- master
77

88
jobs:
9-
publish-tauri:
10-
permissions:
11-
contents: write
9+
v1:
1210
strategy:
1311
fail-fast: false
1412
matrix:
1513
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" # for Tauri v1 you could replace this with ubuntu-20.04.
21-
# - platform: "ubuntu-20.04"
22-
# args: ""
14+
- platform: "macos-latest"
15+
args: "--verbose --target universal-apple-darwin"
16+
- platform: "ubuntu-20.04"
17+
args: "--verbose"
2318
- platform: "windows-latest"
24-
args: ""
19+
args: "--verbose"
2520

2621
runs-on: ${{ matrix.platform }}
2722
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
23+
- uses: actions/checkout@v4
3024

31-
- uses: pnpm/action-setup@v4
32-
name: Install pnpm
25+
# node
26+
- name: install pnpm
27+
uses: pnpm/action-setup@v4
3328
with:
34-
version: 8
35-
run_install: false
29+
version: 9.x.x
3630

37-
- name: Install Node.js
31+
- name: setup node
3832
uses: actions/setup-node@v4
3933
with:
40-
node-version: 20
41-
cache: "pnpm"
34+
node-version: lts/*
35+
cache: pnpm
4236

43-
- name: Install dependencies
44-
run: pnpm install
45-
46-
# - name: setup node
47-
# uses: actions/setup-node@v4
48-
# with:
49-
# node-version: lts/*
37+
# TODO: test the auto installation of the tauri cli
38+
- name: install example dependencies
39+
run: |
40+
cd ./.github/fixtures/example-v1
41+
pnpm install
42+
cd ../example-with-tauri-v1
43+
pnpm install
5044
45+
# rust
5146
- name: install Rust stable
5247
uses: dtolnay/rust-toolchain@stable
5348
with:
54-
# Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
55-
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
49+
targets: aarch64-apple-darwin,x86_64-apple-darwin
5650

51+
- uses: Swatinem/rust-cache@v2
52+
with:
53+
cache-on-failure: true
54+
workspaces: |
55+
./.github/fixtures/example-v1/src-tauri -> ../../target
56+
./.github/fixtures/example-with-tauri-v1/src-tauri -> ../../target
57+
58+
# system
5759
- name: install dependencies (ubuntu only)
58-
# if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above.
59-
if: matrix.platform == 'ubuntu-20.04' # This must match the platform value defined above.
60+
if: matrix.platform == 'ubuntu-20.04'
6061
run: |
6162
sudo apt-get update
62-
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
63-
# webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2.
64-
# You can remove the one that doesn't apply to your app to speed up the workflow a bit.
63+
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev
6564
66-
- name: install frontend dependencies
67-
run: yarn install # change this to npm, pnpm or bun depending on which one you use.
65+
- name: Preconfigured Tauri Project
66+
uses: ./
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
# Updater signature is exposed here to make sure it works in PR's
70+
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
71+
with:
72+
projectPath: ./.github/fixtures/example-with-tauri-v1
73+
includeDebug: true
74+
includeRelease: false
75+
tagName: ${{ !github.event.pull_request.head.repo.fork && 'example-with-tauri-v__VERSION__' || '' }}
76+
releaseName: "Release example with preconfigured Tauri app v__VERSION__ for tauri-v1"
77+
releaseBody: "See the assets to download this version and install."
78+
releaseDraft: true
79+
args: ${{ matrix.args }}
80+
81+
- name: Frontend-only Project
82+
uses: ./
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
# Updater signature is exposed here to make sure it works in PR's
86+
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
87+
with:
88+
projectPath: ./.github/fixtures/example-v1
89+
distPath: ../dist # relative to tauri.conf.json
90+
iconPath: ./icon.png # relative to projectPath
91+
bundleIdentifier: com.tauri.actiontest
92+
appName: example
93+
appVersion: ../package.json # relative to tauri.conf.json
94+
includeDebug: true
95+
includeRelease: false
96+
tagName: ${{ !github.event.pull_request.head.repo.fork && 'example-v__VERSION__' || '' }}
97+
releaseName: "Release example app v__VERSION__ for tauri-v1"
98+
releaseBody: "See the assets to download this version and install."
99+
releaseDraft: true
100+
args: ${{ matrix.args }}
68101

69102
- uses: tauri-apps/tauri-action@v0
70103
env:

0 commit comments

Comments
 (0)