implemented ci/cd pipeling for testing and deploying application to crates io

This commit is contained in:
2023-01-24 00:32:49 +00:00
parent 1ede60df34
commit 20b15ba12e
2 changed files with 22 additions and 1 deletions

21
.gitlab-ci.yml Normal file
View File

@@ -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