-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 1.63 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
name: build
on:
push:
branches:
- 'develop'
pull_request:
types: [opened, reopened, review_requested]
jobs:
check-src:
runs-on: ubuntu-latest
name: check if server files changed
outputs:
status: ${{ steps.changed-files.outputs.modified_files }}
steps:
- uses: actions/checkout@v4
- uses: tj-actions/changed-files@v42
id: changed-files
with:
files: |
.github/actions/setup-build/action.yml
.github/workflows/build.yml
./**/*.rs
./**/*.toml
./**/*.ts
./**/*.svelte
./package.json
build-server:
needs: check-src
name: build-server
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup
if: needs.check-src.outputs.status
uses: ./.github/actions/setup-build
with:
os: ${{ matrix.os }}
- name: install dependencies (ubuntu only)
if: needs.check-src.outputs.status && matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev librsvg2-dev
- name: Sync node version and setup cache
if: needs.check-src.outputs.status
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
cache-dependency-path: package-lock.json
- name: build server
if: needs.check-src.outputs.status
run: |
python3 build.py build