forked from tauri-apps/tauri-action
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (88 loc) · 3.7 KB
/
test-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: 'real world tests'
on:
workflow_dispatch:
pull_request:
push:
branches:
- dev
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- platform: 'macos-latest'
args: '--verbose --target universal-apple-darwin'
- platform: 'ubuntu-latest'
args: '--verbose'
- platform: 'windows-latest'
args: '--verbose'
runs-on: ${{ matrix.settings.platform }}
steps:
- uses: actions/checkout@v4
# node
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.x.x
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
# example-with-tauri tests the auto installation of the tauri cli
- name: install example dependencies
run: pnpm install
working-directory: ./__fixtures__/example
# rust
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
workspaces: |
./__fixtures__/example/src-tauri -> ../../target
./__fixtures__/example-with-tauri/src-tauri -> ../../target
# system
- name: install dependencies (ubuntu only)
if: matrix.settings.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev
- name: Preconfigured Tauri Project
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Updater signature is exposed here to make sure it works in PR's
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
with:
projectPath: ./__fixtures__/example-with-tauri
includeDebug: true
includeRelease: false
tagName: example-with-tauri-v__VERSION__
releaseName: 'Release example with preconfigured Tauri app v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
args: ${{ matrix.settings.args }}
- name: Frontend-only Project
uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Updater signature is exposed here to make sure it works in PR's
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
with:
projectPath: ./__fixtures__/example
distPath: ../dist # relative to tauri.conf.json
iconPath: ./icon.png # relative to projectPath
bundleIdentifier: com.tauri.actiontest
appName: example
appVersion: ../package.json # relative to tauri.conf.json
includeDebug: true
includeRelease: false
tagName: example-v__VERSION__
releaseName: 'Release example app v__VERSION__'
releaseBody: 'See the assets to download this version and install.'
releaseDraft: true
args: ${{ matrix.settings.args }}