-
-
Notifications
You must be signed in to change notification settings - Fork 102
55 lines (43 loc) · 1.36 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
name: Build omnisette-server
on:
push:
tags:
- '*'
jobs:
build:
name: Build omnisette-server
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Install additional rust targets
run: rustup target add aarch64-unknown-linux-gnu
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Install cross
run: cargo install cross
- name: Build for x86_64
run: cargo build --release
- name: Build for aarch64
run: cross build --release --target aarch64-unknown-linux-gnu
- name: Move and rename binaries
run: |
cp target/release/omnisette-server target/omnisette-server-linux-x86_64
cp target/aarch64-unknown-linux-gnu/release/omnisette-server target/omnisette-server-linux-aarch64
- name: Upload to new release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: |
target/omnisette-server-linux-x86_64
target/omnisette-server-linux-aarch64
body: |
## Changelog
- TODO