add drone ci
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
Mason 2024-04-02 13:27:01 -04:00
parent c959bb1948
commit 4c0528dca7
Signed by untrusted user who does not match committer: guangzong
GPG Key ID: 095389BACAE97D19

28
.drone.yml Normal file
View File

@ -0,0 +1,28 @@
---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
trigger:
branch:
- main
steps:
- name: build
commands:
- ./d download-all
- git clone --depth 1 ssh://gitea@git.ggeta.com:2002/guangzong/stm32-data-generated.git build -q
- rm -f ./build/data
- rm -f ./build/stm32-metapac
- cargo run --release --bin stm32-data-gen
- cargo run --release --bin stm32-metapac-gen
- export COMMIT_HASH=$(git rev-parse HEAD)
- cd build/
- git add data stm32-metapac
- git commit -m "Generated from stm32-data $COMMIT_HASH"
- git tag - a stm32-data-$COMMIT -m "Generated from stm32-data $COMMIT_HASH"
- git push --follow-tags