This commit is contained in:
parent
af67c1b48c
commit
f2a8202e84
1 changed files with 41 additions and 0 deletions
41
.forgejo/workflows/build.yaml
Normal file
41
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: Rust Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: node-16
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://github.com/actions/checkout@v3
|
||||
|
||||
- name: Install Rust
|
||||
uses: https://github.com/actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Build release
|
||||
run: cargo build --release
|
||||
|
||||
- name: Show binary
|
||||
run: |
|
||||
if [ -f target/release/rcc-bot ]; then
|
||||
echo "Binary compiled successfully!"
|
||||
ls -lh target/release/rcc-bot
|
||||
else
|
||||
echo "Compilation failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload artifact
|
||||
uses: https://github.com/actions/upload-artifact@v3
|
||||
with:
|
||||
name: rcc-bot
|
||||
path: target/release/rcc-bot
|
||||
Loading…
Add table
Add a link
Reference in a new issue