-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.69 KB
/
only_linux_binary.yml
File metadata and controls
54 lines (47 loc) · 1.69 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
name: Build hanzo-node Linux binary
on:
workflow_dispatch:
jobs:
build:
name: Build binary
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Cache cargo assets
id: cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: linux-build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
env:
AI_MODEL_CATALOG_BUILD: 1
run: cargo build --release
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/hanzo-node
asset_name: hanzo-node-x86_64-unknown-linux-gnu
tag: ${{ github.ref }}
overwrite: true
- name: Prepare binary files
run: |
mkdir files-to-r2
cp target/release/hanzo-node files-to-r2/hanzo-node-${{ github.ref_name }}
cp target/release/hanzo-node files-to-r2/hanzo-node-latest
- name: Upload binaries to R2 bucket
uses: shallwefootball/s3-upload-action@master
with:
endpoint: https://54bf1bf573b3e6471e574cc4d318db64.r2.cloudflarestorage.com
aws_key_id: ${{ secrets.R2_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
aws_bucket: hanzo-download
source_dir: files-to-r2
destination_dir: ./hanzo-node/binaries/x86_64-unknown-linux-gnu/