here_be_dragons/.drone.yml

38 lines
915 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
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
- cargo build --all
- cargo build --examples --all
- cargo test --verbose --all
- cargo clippy
2022-03-18 17:33:41 +00:00
- name: release
image: rust
commands:
2022-03-18 18:58:20 +00:00
- cargo publish
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
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 18:32:03 +00:00
message: >
{{#success build.status}}
{{repo.name}} build {{build.number}} succeeded. <{{build.link}}>
2022-03-18 18:32:03 +00:00
{{else}}
{{repo.name}} build {{build.number}} failed. <{{build.link}}>
2022-03-18 18:32:03 +00:00
{{/success}}