From a498e1416f4f6c69f7e9c677b57c7a1a4a540e3d Mon Sep 17 00:00:00 2001 From: shimun Date: Tue, 23 Jun 2020 23:21:04 +0200 Subject: [PATCH] automate cargo publish --- .drone.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.drone.yml b/.drone.yml index a86d980..0c3e955 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,23 +14,16 @@ steps: - echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev - cargo test - - name: build + - name: publish image: rust:1.43.0 + environment: + CARGO_REGISTRY_TOKEN: + from_secret: cargo_tkn commands: + - grep -E 'version ?= ?"${DRONE_TAG}"' -i Cargo.toml || (printf "incorrect crate/tag version" && exit 1) - apt update && apt install -y libkeyutils-dev libclang-dev clang pkg-config - echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev - - cargo install -f --path . --root . + - cargo package --all-features + - cargo publish --all-features when: event: tag - - name: publish - image: plugins/github-release - settings: - api_key: - from_secret: github_release - files: - - bin/fido2luks - checksum: - - md5 - - sha256 - when: - event: tag