-
-
Notifications
You must be signed in to change notification settings - Fork 6
132 lines (115 loc) · 4.67 KB
/
build.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: "Nightly Builds"
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-tauri:
strategy:
fail-fast: false
matrix:
include:
- platform: "macos-latest"
args: "--target aarch64-apple-darwin"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin"
- platform: "ubuntu-latest"
args: ""
- platform: "windows-latest"
args: ""
runs-on: ${{ matrix.platform }}
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./src-tauri -> target"
- name: pnpm cache
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev libasound2-dev
echo "PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig" >> $GITHUB_ENV
- name: install frontend dependencies
run: npm install -g pnpm && pnpm install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: ${{ matrix.args }}
- name: Basic macOS code signing
if: matrix.platform == 'macos-latest'
run: |
codesign --force --deep --sign - src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app
- name: Publish macOS Artifact
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: build-macos-dmg-${{ matrix.args == '--target aarch64-apple-darwin' && 'arm64' || 'x86_64' }}
path: src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/dmg/*.dmg
- name: Publish macOS Updater Files
if: matrix.platform == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: updater-files-macos-${{ matrix.args == '--target aarch64-apple-darwin' && 'arm64' || 'x86_64' }}
path: |
src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz
src-tauri/target/${{ matrix.args == '--target aarch64-apple-darwin' && 'aarch64-apple-darwin' || 'x86_64-apple-darwin' }}/release/bundle/macos/*.app.tar.gz.sig
- name: Publish Windows Artifact
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: build-windows-msi
path: src-tauri/target/release/bundle/msi/*.msi
- name: Publish Windows Updater Files
if: matrix.platform == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: updater-files-windows
path: |
src-tauri/target/release/bundle/msi/*.msi
src-tauri/target/release/bundle/msi/*.msi.sig
- name: Publish Ubuntu Artifacts
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: build-ubuntu-deb
path: src-tauri/target/release/bundle/deb/*.deb
- uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-latest'
with:
name: build-ubuntu-appimage
path: src-tauri/target/release/bundle/appimage/*.AppImage
- uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-latest'
with:
name: build-ubuntu-rpm
path: src-tauri/target/release/bundle/rpm/*.rpm
- name: Publish Ubuntu Updater Files
if: matrix.platform == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: updater-files-ubuntu
path: |
src-tauri/target/release/bundle/appimage/*.AppImage
src-tauri/target/release/bundle/appimage/*.AppImage.sig