-
-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (38 loc) · 1.05 KB
/
build.yml
File metadata and controls
48 lines (38 loc) · 1.05 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
name: Build
on:
push:
branches: [ main ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
- name: Build release
run: cargo build --release --target x86_64-unknown-linux-gnu
- name: Package binary
run: |
cd target/x86_64-unknown-linux-gnu/release
tar czf ../../../polytorus-linux-amd64.tar.gz polytorus
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: polytorus-linux-amd64
path: polytorus-linux-amd64.tar.gz