34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
name: Build && Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: cargo build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install clang to compile quickjs-ng
|
|
run: apt update && apt install -y clang libclang-dev
|
|
- name: Install minimal stable with clippy and rustfmt
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: cargo build --release --target x86_64-unknown-linux-gnu
|
|
|
|
- name: Upload Release Binary
|
|
id: bot-artifact
|
|
uses: christopherhx/gitea-upload-artifact@v4
|
|
with:
|
|
name: botrunner
|
|
path: target/x86_64-unknown-linux-gnu/release/gongbotrs
|
|
|
|
- name: Deploy with WebHook
|
|
# temporary solutino to hardcode artifact url, because upload-artifact's artifact-url gives wrong one
|
|
run: curl http://${{ secrets.SERVER_ADDR }}/hooks/gongbot-deploy?binaryzip='https://git.akulij.ru/akulij/gongbotrs/actions/runs/${{ gitea.run_number }}/artifacts/botrunner'
|