-
Notifications
You must be signed in to change notification settings - Fork 6
99 lines (82 loc) · 2.66 KB
/
nightly_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
name: Nightly Build
on:
workflow_dispatch:
push:
branches: [dev]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Nightly Version
strategy:
fail-fast: false
matrix:
platform: [ubuntu-20.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Setup Rust Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: v1-${{ matrix.platform }}-rust-cache-${{ hashFiles('Cargo.lock') }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ matrix.platform }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ matrix.platform }}-pnpm-store-
- name: Install Frontend Dependencies
working-directory: owmods_gui/frontend
run: pnpm install
- name: Install Tauri CLI
run: pnpm add -g @tauri-apps/cli
- name: Build GUI
run: tauri build --ci -b $([[ ${{ matrix.platform }} = 'windows-latest' ]] && echo 'msi nsis' || echo 'appimage deb')
shell: bash
env:
VITE_COMMIT: ${{ github.sha }}
VITE_VERSION_SUFFIX: -nightly
# Seperate artifacts for each platform
- name: Upload GUI (Linux)
uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-20.04'
with:
name: GUI-Nightly-Linux
path: |
target/release/bundle/**/*.deb
target/release/bundle/**/*.AppImage
- name: Upload GUI (Windows)
uses: actions/upload-artifact@v4
if: matrix.platform == 'windows-latest'
with:
name: GUI-Nightly-Windows
path: |
target/release/bundle/**/*.msi
target/release/bundle/**/*.exe
target/release/*.exe