fix CI to login into cargo before publishing

This commit is contained in:
Ritesh Chitlangi 2021-07-29 23:47:51 +08:00
parent 0922b82ce0
commit 38b12fcdc1
1 changed files with 1 additions and 0 deletions

View File

@ -39,6 +39,7 @@ steps:
commands: commands:
- export CARGO_HOME=/tmp/cargo - export CARGO_HOME=/tmp/cargo
- export CARGO_TARGET_DIR=/tmp/cargo-target - export CARGO_TARGET_DIR=/tmp/cargo-target
- cargo login
- export EPP_CLIENT_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client/Cargo.toml | grep -E "([+\-]){1}version" | wc -l) - export EPP_CLIENT_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client/Cargo.toml | grep -E "([+\-]){1}version" | wc -l)
- if [ $EPP_CLIENT_VERSION_CHANGE -eq 2 ]; then echo "epp-client version updated. publishing to crates.io" && cd epp-client && cargo publish && cd .. ; else echo "epp-client version unchanged"; fi - if [ $EPP_CLIENT_VERSION_CHANGE -eq 2 ]; then echo "epp-client version updated. publishing to crates.io" && cd epp-client && cargo publish && cd .. ; else echo "epp-client version unchanged"; fi
- export EPP_CLIENT_MACROS_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client-macros/Cargo.toml | grep -E "([+\-]){1}version" | wc -l) - export EPP_CLIENT_MACROS_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client-macros/Cargo.toml | grep -E "([+\-]){1}version" | wc -l)