here_be_dragons/.drone.yml

41 lines
929 B
YAML
Raw Normal View History

2022-03-18 17:05:27 +00:00
kind: pipeline
2022-03-18 17:33:41 +00:00
type: docker
2022-03-18 17:05:27 +00:00
name: default
steps:
- name: test
image: rust
2022-12-15 20:39:04 +00:00
pull: always
2022-03-18 17:05:27 +00:00
commands:
2022-03-18 17:45:53 +00:00
- rustup component add clippy rustfmt
2022-03-18 17:05:27 +00:00
- cargo fmt --check
2022-12-15 20:39:04 +00:00
- cargo test
2022-03-18 17:05:27 +00:00
- cargo clippy
2022-03-18 17:33:41 +00:00
- name: release
image: rust
2022-12-15 20:39:04 +00:00
pull: always
2022-03-18 17:33:41 +00:00
commands:
2022-12-15 20:39:04 +00:00
- cargo publish
2022-03-18 18:58:20 +00:00
when:
event:
- tag
2022-03-18 17:33:41 +00:00
environment:
CARGO_REGISTRY_TOKEN:
from_secret: cargo_registry_token
2022-03-18 18:32:03 +00:00
- name: discord notification
image: appleboy/drone-discord
2022-03-22 14:16:33 +00:00
when:
status: [success, failure]
2022-03-18 18:32:03 +00:00
settings:
2022-03-18 18:37:21 +00:00
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
2022-03-18 20:15:56 +00:00
tts: true
2022-03-18 18:32:03 +00:00
message: >
{{#success build.status}}
2022-03-22 14:27:24 +00:00
{{repo.name}} build {{build.number}} succeeded: <{{build.link}}>
2022-03-18 18:32:03 +00:00
{{else}}
2022-03-22 14:27:24 +00:00
{{repo.name}} build {{build.number}} failed: <{{build.link}}>
2022-03-18 18:32:03 +00:00
{{/success}}