-
-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (42 loc) · 1.51 KB
/
builds.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
name: Release build
on:
push:
branches: [ "main" ]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update --no-self-update stable
- name: Create Directorys
run: |
mkdir bin
mkdir lib
- name: Build
run: |
cargo build --all --release
mv target/release/* bin/ || true
find bin -type f ! -executable -delete
- name: Move libs
run: |
mv target/release/*.so lib/ || true
mv target/release/*.dylib lib/ || true
mv target/release/*.dll lib/ || true
- name: Set up Git user for commit
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Commit and force push to build branch
run: |
git fetch origin build
git checkout -B build origin/build || git checkout --orphan build
git rm -r --cached . || true
git add bin lib
git commit -m "[BUILD] releasing new build" || echo "No changes to commit"
git push origin HEAD:build --force