From 20b15ba12eac61697b5343ac04110f8138e3d180 Mon Sep 17 00:00:00 2001 From: Quirin Ecker Date: Tue, 24 Jan 2023 00:32:49 +0000 Subject: [PATCH] implemented ci/cd pipeling for testing and deploying application to crates io --- .gitlab-ci.yml | 21 +++++++++++++++++++++ Cargo.toml | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..46d9fd5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +workflow: + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"' + +default: + image: 'rust:slim' + +build: + script: + - cargo build + +test: + script: + - cargo test + +publish: + script: + - export CARGO_REGISTRY_TOKEN=$CARGO_TOKEN + - cargo publish + + diff --git a/Cargo.toml b/Cargo.toml index 1adc0c0..335bd77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "docki" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "cli for building and publishing documentation using asciidoctor" license-file = "LICENSE.txt"