From 1f017d8abcf82577c083d64e86ae28eadc177cc5 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Tue, 20 Dec 2022 09:34:43 -0600 Subject: [PATCH] Simplify dependencies. --- .drone.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6696e4f --- /dev/null +++ b/.drone.yml @@ -0,0 +1,47 @@ +kind: pipeline +type: docker +name: default + +environment: + DEPENDENCIES: libudev-dev + +steps: + - name: test + image: rust:bullseye + pull: always + commands: + - apt-get update -qq + - apt-get install -qqy $DEPENDENCIES + - rustup component add clippy rustfmt + - cargo fmt --check + - cargo test + - cargo clippy + - name: release + image: rust:bullseye + pull: always + commands: + - apt-get update -qq + - apt-get install -qqy $DEPENDENCIES + - cargo publish + when: + ref: + - refs/tags/v* + environment: + CARGO_REGISTRY_TOKEN: + from_secret: cargo_registry_token + - name: discord notification + image: appleboy/drone-discord + when: + status: [success, failure] + settings: + webhook_id: + from_secret: discord_webhook_id + webhook_token: + from_secret: discord_webhook_token + tts: true + message: > + {{#success build.status}} + {{repo.name}} build {{build.number}} succeeded: <{{build.link}}> + {{else}} + {{repo.name}} build {{build.number}} failed: <{{build.link}}> + {{/success}}