-
Notifications
You must be signed in to change notification settings - Fork 47
48 lines (38 loc) · 1.02 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
name: CI
on:
push:
branches: ["main"]
tags:
- "v*"
pull_request:
branches: ["main"]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up cargo-ndk
run: cargo install cargo-ndk
- name: set up aarch64 target
run: rustup target add aarch64-linux-android
- name: build
run: cargo ndk --target aarch64-linux-android build --release
- name: move files
run: |
mv target/aarch64-linux-android/release/linjector-cli ./linjector-cli
- name: save hashes in env
run: |
echo '```' > hashes.txt
echo "SHA256 hashes:" >> hashes.txt
sha256sum linjector-cli >> hashes.txt
echo '```' >> hashes.txt
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
body_path: hashes.txt
files: |
./linjector-cli