-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (31 loc) · 1.02 KB
/
build-parser.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
name: Build agc-parser
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build agc-parser
run: cargo build --release
- name: Move binary to root.
run: mv ./target/release/agc-parser .
- uses: actions/checkout@v4
with:
ref: main
path: main-branch
- name: Kidnap the binary file to main branch then commit him.
run: |
cp ./agc-parser ./main-branch/
cd ./main-branch
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git add ./agc-parser
git commit -m "chore: update agc-parser binary." -a
echo "::set-output name=push::true"
shell: bash
- name: Push changes
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main