6
6
tags :
7
7
- ' v*'
8
8
paths :
9
+ - .github/workflows/app-release.yml
9
10
- ' apps/app/**'
10
11
- ' apps/app-frontend/**'
11
12
- ' packages/app-lib/**'
@@ -20,12 +21,12 @@ jobs:
20
21
strategy :
21
22
fail-fast : false
22
23
matrix :
23
- platform : [macos-latest, windows-latest, ubuntu-20 .04]
24
+ platform : [macos-latest, windows-latest, ubuntu-22 .04]
24
25
25
26
runs-on : ${{ matrix.platform }}
26
27
27
28
steps :
28
- - uses : actions/checkout@v3
29
+ - uses : actions/checkout@v4
29
30
30
31
- name : Rust setup (mac)
31
32
if : startsWith(matrix.platform, 'macos')
@@ -43,13 +44,34 @@ jobs:
43
44
- name : Setup rust cache
44
45
uses : actions/cache@v4
45
46
with :
46
- path : target/**
47
+ path : |
48
+ target/**
49
+ !target/*/release/bundle/*/*.dmg
50
+ !target/*/release/bundle/*/*.app.tar.gz
51
+ !target/*/release/bundle/*/*.app.tar.gz.sig
52
+ !target/release/bundle/*/*.dmg
53
+ !target/release/bundle/*/*.app.tar.gz
54
+ !target/release/bundle/*/*.app.tar.gz.sig
55
+
56
+ !target/release/bundle/*/*.AppImage
57
+ !target/release/bundle/*/*.AppImage.tar.gz
58
+ !target/release/bundle/*/*.AppImage.tar.gz.sig
59
+ !target/release/bundle/*/*.deb
60
+ !target/release/bundle/*/*.rpm
61
+
62
+ !target/release/bundle/msi/*.msi
63
+ !target/release/bundle/msi/*.msi.zip
64
+ !target/release/bundle/msi/*.msi.zip.sig
65
+
66
+ !target/release/bundle/nsis/*.exe
67
+ !target/release/bundle/nsis/*.nsis.zip
68
+ !target/release/bundle/nsis/*.nsis.zip.sig
47
69
key : ${{ runner.os }}-rust-target-${{ hashFiles('**/Cargo.lock') }}
48
70
restore-keys : |
49
71
${{ runner.os }}-rust-target-
50
72
51
73
- name : Use Node.js
52
- uses : actions/setup-node@v3
74
+ uses : actions/setup-node@v4
53
75
with :
54
76
node-version : 20
55
77
66
88
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
67
89
68
90
- name : Setup pnpm cache
69
- uses : actions/cache@v3
91
+ uses : actions/cache@v4
70
92
with :
71
93
path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
72
94
key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
@@ -77,14 +99,13 @@ jobs:
77
99
if : startsWith(matrix.platform, 'ubuntu')
78
100
run : |
79
101
sudo apt-get update
80
- sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0 -dev libappindicator3- dev librsvg2 -dev patchelf libselinux1
102
+ sudo apt-get install -y libwebkit2gtk-4.1 -dev build-essential curl wget file libxdo- dev libssl -dev pkg-config libayatana-appindicator3-dev librsvg2-dev
81
103
82
104
- name : Install frontend dependencies
83
105
run : pnpm install
84
106
85
107
- name : build app (macos)
86
- uses : tauri-apps/tauri-action@v0
87
- id : build_os_mac
108
+ run : pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config "tauri-release.conf.json"
88
109
if : startsWith(matrix.platform, 'macos')
89
110
env :
90
111
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -95,34 +116,40 @@ jobs:
95
116
APPLE_ID : ${{ secrets.APPLE_ID }}
96
117
APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
97
118
APPLE_PASSWORD : ${{ secrets.APPLE_PASSWORD }}
98
- TAURI_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
99
- TAURI_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
100
- with :
101
- args : " --target universal-apple-darwin --config ./apps/app/tauri-release.conf.json"
102
- working-directory : ./apps/app
119
+ TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
120
+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
103
121
104
122
- name : build app
105
- uses : tauri-apps/ tauri-action@v0
123
+ run : pnpm --filter=@modrinth/app run tauri build --config "tauri-release.conf.json"
106
124
id : build_os
107
125
if : " !startsWith(matrix.platform, 'macos')"
108
126
env :
109
127
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110
- TAURI_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
111
- TAURI_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
112
- with :
113
- args : " --config ./apps/app/tauri-release.conf.json"
114
- working-directory : ./apps/app
128
+ TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
129
+ TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
115
130
116
131
- name : upload ${{ matrix.platform }}
117
- uses : actions/upload-artifact@v3
118
- if : startsWith(matrix.platform, 'macos')
119
- with :
120
- name : ${{ matrix.platform }}
121
- path : " ${{ join(fromJSON(steps.build_os_mac.outputs.artifactPaths), '\n ') }}"
122
-
123
- - name : upload ${{ matrix.platform }}
124
- uses : actions/upload-artifact@v3
125
- if : " !startsWith(matrix.platform, 'macos')"
132
+ uses : actions/upload-artifact@v4
126
133
with :
127
134
name : ${{ matrix.platform }}
128
- path : " ${{ join(fromJSON(steps.build_os.outputs.artifactPaths), '\n ') }}"
135
+ path : |
136
+ target/*/release/bundle/*/*.dmg
137
+ target/*/release/bundle/*/*.app.tar.gz
138
+ target/*/release/bundle/*/*.app.tar.gz.sig
139
+ target/release/bundle/*/*.dmg
140
+ target/release/bundle/*/*.app.tar.gz
141
+ target/release/bundle/*/*.app.tar.gz.sig
142
+
143
+ target/release/bundle/*/*.AppImage
144
+ target/release/bundle/*/*.AppImage.tar.gz
145
+ target/release/bundle/*/*.AppImage.tar.gz.sig
146
+ target/release/bundle/*/*.deb
147
+ target/release/bundle/*/*.rpm
148
+
149
+ target/release/bundle/msi/*.msi
150
+ target/release/bundle/msi/*.msi.zip
151
+ target/release/bundle/msi/*.msi.zip.sig
152
+
153
+ target/release/bundle/nsis/*.exe
154
+ target/release/bundle/nsis/*.nsis.zip
155
+ target/release/bundle/nsis/*.nsis.zip.sig
0 commit comments