-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (73 loc) · 2.54 KB
/
release.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
name: 'Generate binaries'
on:
release:
types: [published]
permissions:
contents: write
jobs:
generate-linux-binaries:
name: Build linux binary for target ${{ matrix.target }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
rustup component add rust-src
- name: Install Cross
run: |
cargo install cross --git https://github.com/cross-rs/cross
- name: Build frontend
run: |
npm i
npm run build
- name: Build binary
run: |
cd src-tauri
CROSS_NO_WARNINGS=0 cross +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --release --target ${{ matrix.target }}
mv target/${{ matrix.target }}/release/tess target/${{ matrix.target }}/release/tess-${{ matrix.target }}
- name: Publish binary
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/${{ matrix.target }}/release/tess-${{ matrix.target }}
generate-windows-binaries:
name: Build Windows binary for target ${{ matrix.target }}
strategy:
matrix:
target:
- x86_64-pc-windows-msvc
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 'latest'
- name: Install Rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
rustup component add rust-src
- name: Build frontend
run: |
npm i
npm run build
- name: Build binary
run: |
cd src-tauri
cargo +nightly build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --release --target ${{ matrix.target }}
mv target/${{ matrix.target }}/release/tess.exe target/${{ matrix.target }}/release/tess-${{ matrix.target }}.exe
- name: Publish binary
uses: softprops/action-gh-release@v2
with:
files: |
src-tauri/target/${{ matrix.target }}/release/tess-${{ matrix.target }}.exe