-
Notifications
You must be signed in to change notification settings - Fork 4
135 lines (119 loc) · 3.54 KB
/
Copy pathbuild-app.yml
File metadata and controls
135 lines (119 loc) · 3.54 KB
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Build App Artifacts
on:
push:
branches:
- main
paths:
- .github/workflows/build-app.yml
- "apps/app/**"
- "apps/web/**"
- "packages/shared/**"
- "packages/ui/**"
- "packages/configs/**"
- "packages/locales/**"
- "packages/resource-provider/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "Cargo.toml"
- "Cargo.lock"
pull_request:
branches:
- main
paths:
- .github/workflows/build-app.yml
- "apps/app/**"
- "apps/web/**"
- "packages/shared/**"
- "packages/ui/**"
- "packages/configs/**"
- "packages/locales/**"
- "packages/resource-provider/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "Cargo.toml"
- "Cargo.lock"
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.platform }}
name: build (${{ matrix.platform }})
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup pnpm
uses: pnpm/action-setup@v4
# version comes from package.json "packageManager"
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Cache Cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-cargo-app-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-app-
- name: Install system dependencies (ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
libgtk-3-dev \
libsoup-3.0-dev
- name: Install JS dependencies
run: pnpm install --frozen-lockfile
- name: Build app
env:
IS_ACTION_BUILD: true
run: pnpm app:build
- name: Upload Artifacts
uses: actions/upload-artifact@v5
with:
name: MCSL-Future-Tauri-${{ matrix.platform }}
if-no-files-found: warn
path: |
target/*/release/bundle/*/*.dmg
target/*/release/bundle/*/*.app.tar.gz
target/*/release/bundle/*/*.app.tar.gz.sig
target/release/bundle/*/*.dmg
target/release/bundle/*/*.app.tar.gz
target/release/bundle/*/*.app.tar.gz.sig
target/release/bundle/*/*.AppImage
target/release/bundle/*/*.AppImage.tar.gz
target/release/bundle/*/*.AppImage.tar.gz.sig
target/release/bundle/*/*.deb
target/release/bundle/*/*.rpm
target/release/bundle/msi/*.msi
target/release/bundle/msi/*.msi.zip
target/release/bundle/msi/*.msi.zip.sig
target/release/bundle/nsis/*.exe
target/release/bundle/nsis/*.nsis.zip
target/release/bundle/nsis/*.nsis.zip.sig