From cbdd71e475546e3e1625f401554af0fa78cfeabf Mon Sep 17 00:00:00 2001 From: KAAAsS Date: Fri, 5 Feb 2021 18:55:13 +0800 Subject: [PATCH] Add Auto release config --- .drone.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index c64e65a..fa36967 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,15 +3,38 @@ type: docker name: default steps: - - name: build + # Test + - name: test image: rust environment: SECRET_INPUT: from_secret: secret_input commands: - cargo build --verbose --all - - cargo test --verbose --all + - cargo test --verbose --all --lib # Simple test - 'echo "Input: $SECRET_INPUT"' - cargo run $SECRET_INPUT > output - - 'echo "Output: " && cat output' \ No newline at end of file + - '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 + api_key: + from_secret: gitea_token + files: + - target/release/ci-test + checksum: + - md5 + - sha1 + - sha256 + when: + event: tag \ No newline at end of file