-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (68 loc) · 2.2 KB
/
Copy pathbuild.yml
File metadata and controls
82 lines (68 loc) · 2.2 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
on:
push:
branches: ["main"]
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
job:
- {
os: windows-latest,
target: x86_64-pc-windows-msvc,
extension: .exe,
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry
~/.cargo/git
beatrice-client/src-tauri/target
key: ${{ runner.os }}-rust-${{ hashFiles('beatrice-client/src-tauri/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-rust-
- name: Cache JavaScript dependencies
uses: actions/cache@v3
with:
path: |
beatrice-client/node_modules
key: ${{ runner.os }}-javascript-${{ hashFiles('./beatrice-client/yarn.lock') }}
restore-keys: |
${{ runner.os }}-javascript-
- name: yarn install
working-directory: beatrice-client
run: yarn install
- name: Generate ThirdPartyLicenses-javascript
working-directory: beatrice-client
run: |
yarn licenses generate-disclaimer > ../ThirdPartyLicenses-javascript.txt
- name: Generate ThirdpartyLicenses.html
run: |
cargo install --locked cargo-about || true
cargo about generate about.hbs -o ThirdpartyLicenses.html
- name: build tauri
working-directory: beatrice-client
run: |
yarn tauri build
- name: Create ZIP archive
run: |
Compress-Archive -Path target/release/beatrice-client.exe,ThirdPartyLicenses-javascript.txt,ThirdpartyLicenses.html,beatrice-client/src/components/ui/shadcn-license.txt -DestinationPath beatrice-client.zip
shell: pwsh
- name: Attach File
uses: softprops/action-gh-release@v2
with:
draft: true
files: beatrice-client.zip