diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 96e9fa12af35a7851b3e904db1ea83a8f6f9a4d8..8452653d3e5d843f879540e9793540e804c1429f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - build_and_tests - clippy - fmt + - publish before_script: - export PATH="$HOME/.cargo/bin:$PATH" @@ -55,4 +56,15 @@ fmt: - cargo install --force rustfmt-nightly script: - cargo fmt -- --write-mode=diff - allow_failure: true \ No newline at end of file + allow_failure: true + +publish: + stage: publish + tags: + - redshift-rs-stable + script: + - ./gitlab/publish.sh + only: + - tags + allow_failure: false + when: manual \ No newline at end of file diff --git a/gitlab/publish.sh b/gitlab/publish.sh new file mode 100644 index 0000000000000000000000000000000000000000..f7617406ef13309788c3d7cf697c1ed5fd06ff3e --- /dev/null +++ b/gitlab/publish.sh @@ -0,0 +1,6 @@ +OIFS=$IFS +IFS='/' read -r first a <<< "$CI_COMMIT_TAG" +cd $first +IFS=$OIFS +cargo login $DUNITER_CRATES_TOKEN +cargo publish \ No newline at end of file