From 0ef9651fdfd501ce63be6044375cbf341983747b Mon Sep 17 00:00:00 2001 From: nitramiz Date: Mon, 27 May 2024 13:12:21 +0000 Subject: [PATCH] CI: Start publishing gl-client, gl-plugin, gl-signerproxy --- gitlab/build-crates.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 gitlab/build-crates.yml diff --git a/gitlab/build-crates.yml b/gitlab/build-crates.yml new file mode 100644 index 000000000..29619c3fb --- /dev/null +++ b/gitlab/build-crates.yml @@ -0,0 +1,35 @@ +.build_rust_prep: + extends: .build_setup + when: manual + before_script: + - export NEW_VER=$(echo ${CI_COMMIT_TAG} | cut -d'-' -f2) + - sed -i "s/^version = \".*\"/version = \"$NEW_VER\"/" libs/${PKG_NAME}/Cargo.toml + - . $HOME/.cargo/env # sh doesn't have the correct PATH + script: + - cargo test -p ${PKG_NAME} -- --test-threads=1 || sleep 3600 + - cargo build --release -p ${PKG_NAME} + - cargo publish -p ${PKG_NAME} --allow-dirty # allow-dirty needed because we change the version in Cargo.toml + artifacts: + paths: + - "target/release/${PKG_NAME}" + +build_gl_client: + extends: .build_rust_prep + rules: + - if: $CI_COMMIT_TAG =~ /glclient_\d{8}(_[1-9][0-9]?)?\-.*/ + variables: + PKG_NAME: gl-client + +build_gl_plugin: + extends: .build_rust_prep + rules: + - if: $CI_COMMIT_TAG =~ /glplugin_\d{8}(_[1-9][0-9]?)?\-.*/ + variables: + PKG_NAME: gl-plugin + +build_gl_signerproxy: + extends: .build_rust_prep + rules: + - if: $CI_COMMIT_TAG =~ /glsignerproxy_\d{8}(_[1-9][0-9]?)?\-.*/ + variables: + PKG_NAME: gl-signerproxy