-
Notifications
You must be signed in to change notification settings - Fork 1
113 lines (94 loc) · 3.47 KB
/
publish.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
name: Publish app
on:
create:
env:
WTOOLS_AEAD_KEY: ${{ secrets.WTOOLS_AEAD_KEY }}
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.SERVER_IP }}
REMOTE_USER: ${{ secrets.USERNAME }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
jobs:
mw-toolbox:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
strategy:
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
# - name: Prepare folders on update server
# if: runner.os == 'Linux'
# uses: appleboy/ssh-action@master
# with:
# host: ${{ env.REMOTE_HOST }}
# username: ${{ env.REMOTE_USER }}
# key: ${{ env.SSH_PRIVATE_KEY }}
# script: |
# cd ~/wwwcdn/releases/mw-toolbox/
# rm -rf previous/
# mv latest/ previous
# mkdir -p latest/windows latest/linux latest/darwin
- uses: dtolnay/rust-toolchain@stable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install dependencies (ubuntu only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev librsvg2-dev
# No need for caches for release builds, because they get cleared every week anyway.
- name: Install pnpm and project dependencies
uses: pnpm/action-setup@v4
with:
version: 9
run_install: |
- cwd: gui
- name: Build app
run: |
cd gui
pnpm tauri build
# - name: Upload files to the update server (Windows)
# if: runner.os == 'Windows'
# uses: SamKirkland/[email protected]
# with:
# server: ${{ env.REMOTE_HOST }}
# protocol: ftps
# username: ftpuser
# password: ${{ secrets.FTP_PASSWORD }}
# local-dir: 'target/release/bundle/msi/'
# server-dir: 'releases/mw-toolbox/latest/windows/x86_64'
# - name: Upload files to the update server (Linux)
# if: runner.os == 'Linux'
# uses: easingthemes/ssh-deploy@main
# with:
# SOURCE: 'target/release/bundle/appimage/'
# TARGET: '~/wwwcdn/releases/mw-toolbox/latest/linux/x86_64'
# - name: Upload files to the update server (macOS)
# if: runner.os == 'macOS'
# uses: easingthemes/ssh-deploy@main
# with:
# SOURCE: 'target/release/bundle/macos/'
# TARGET: '~/wwwcdn/releases/mw-toolbox/latest/darwin/x86_64'
# - name: Upload release assets (Windows)
# if: runner.os == 'Windows'
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: target/release/bundle/msi/mw-toolbox_*.msi
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload release assets (Linux)
# if: runner.os == 'Linux'
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: target/release/bundle/appimage/mw-toolbox_*.AppImage
# token: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload release assets (macOS)
# if: runner.os == 'macOS'
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# artifacts: target/release/bundle/macos/mw-toolbox.app
# token: ${{ secrets.GITHUB_TOKEN }}