-
Notifications
You must be signed in to change notification settings - Fork 16
82 lines (73 loc) · 2.14 KB
/
rust.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
name: Rust
on:
#push:
# branches: [ master ]
#pull_request:
# branches: [ master ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019]
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
- name: install linux deps
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt install libwebkit2gtk-4.0-dev libappindicator3-dev
- name: Build Wikit CLI
working-directory: ./cli
run: |
cargo build --release
- name: Build Wikit Desktop
working-directory: ./desktop
run: |
rustup target add wasm32-unknown-unknown
cargo install tauri-cli trunk
cargo tauri build
- name: Prepare Linux Artifact
if: startsWith(matrix.os,'ubuntu')
run: |
mkdir -p linux-artifact
mv target/release/wikit linux-artifact
mv target/release/bundle/appimage/wikit*.AppImage linux-artifact
- name: Archive Linux Artifact
if: startsWith(matrix.os,'ubuntu')
uses: actions/upload-artifact@v2
with:
name: wikit-linux
path: |
linux-artifact
- name: Prepare Darwin Artifact
if: startsWith(matrix.os,'macos')
run: |
mkdir -p darwin-artifact
mv target/release/wikit darwin-artifact
mv target/release/bundle/dmg/*.dmg darwin-artifact
- name: Archive Darwin Artifact
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v2
with:
name: wikit-darwin
path: |
darwin-artifact
- name: Prepare Windows Artifact
if: startsWith(matrix.os,'windows')
run: |
mkdir windows-artifact
move target\release\wikit.exe windows-artifact
move target\release\bundle\msi\*.msi windows-artifact
- name: Archive Windows Artifact
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v2
with:
name: wikit-windows
path: |
windows-artifact