From 95ab885fb4ce10f3f27db08e0f5ebbfbea2f47fb Mon Sep 17 00:00:00 2001 From: Patrick Auernig Date: Tue, 3 Apr 2018 16:52:38 +0200 Subject: [PATCH] Update GitLab CI configuration Add deploy stage for crates.io --- .gitlab-ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d4ba0fa..4fa733b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,9 @@ +image: "rust:latest" + +stages: + - test + - deploy + variables: CARGO_HOME: $CI_PROJECT_DIR/.cargo @@ -12,9 +18,21 @@ variables: .test_job: &test_job <<: *cached environment: test + stage: test -test:rust_1_25_0: +.deploy_job: &deploy_job + <<: *cached + environment: deploy + stage: deploy + +test:rust-stable: <<: *test_job - image: "rust:1.25.0" script: - cargo test --all + +deploy:crates-io: + <<: *deploy_job + script: + - cargo publish --token $CRATES_IO_API_TOKEN + only: + - tags@valeth/discord-rpc-client.rs