ci-test/.drone.yml

41 lines
828 B
YAML
Raw Normal View History

2021-02-05 18:32:21 +08:00
kind: pipeline
type: docker
name: default
steps:
2021-02-05 18:55:13 +08:00
# Test
- name: test
2021-02-05 18:32:21 +08:00
image: rust
environment:
SECRET_INPUT:
from_secret: secret_input
commands:
- cargo build --verbose --all
2021-02-05 18:55:13 +08:00
- cargo test --verbose --all --lib
2021-02-05 18:32:21 +08:00
# Simple test
- 'echo "Input: $SECRET_INPUT"'
- cargo run $SECRET_INPUT > output
2021-02-05 18:55:13 +08:00
- 'echo "Output: " && cat output'
# Release
- name: build-release
image: rust
commands:
- cargo build --release
when:
event: tag
- name: gitea-release
image: plugins/gitea-release
settings:
base_url: https://git.kaaass.net
2021-02-05 19:07:43 +08:00
api-key:
2021-02-05 18:55:13 +08:00
from_secret: gitea_token
2021-02-05 19:07:43 +08:00
title: Release
2021-02-05 18:55:13 +08:00
files:
- target/release/ci-test
checksum:
- md5
- sha1
- sha256
when:
event: tag