Loading templates/gitlab-ci-semrel.yml +25 −5 Original line number Diff line number Diff line Loading @@ -611,10 +611,20 @@ stages: yq_version=$(github_get_latest_version mikefarah/yq) yq_binary=yq_linux_amd64 yq_url="https://github.com/mikefarah/yq/releases/download/${yq_version}/${yq_binary}.tar.gz" yq_cache="$XDG_CACHE_HOME/yq-$(echo "$yq_url" | md5sum | cut -d" " -f1)" if [[ -f "$yq_cache" ]] then log_info "yq found in cache: reuse" else log_info "yq not found in cache: download" log_info "Download latest yq version: \\e[32m$yq_url\\e[0m" download_file "${yq_url}" "${yq_binary}.tar.gz" tar xvf "${yq_binary}.tar.gz" mv "${yq_binary}" /usr/bin/yq mkdir -p "$XDG_CACHE_HOME" mv "${yq_binary}" "$yq_cache" fi ln -s "$yq_cache" /usr/bin/yq fi } Loading Loading @@ -745,11 +755,21 @@ stages: - cd "${SEMREL_CONFIG_DIR}" - prepare_semantic_release - install_semantic_release_plugins variables: # download cache XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" # NPM cache npm_config_cache: "$CI_PROJECT_DIR/.npm" # Cache downloaded dependencies and plugins between builds. # To keep cache across branches add 'key: "$CI_JOB_NAME"' cache: # cache shall be per branch per template key: "$CI_COMMIT_REF_SLUG-SEMREL" when: always paths: - .npm/ - "$CI_PROJECT_DIR/.npm" - "$XDG_CACHE_HOME" semantic-release-info: extends: .semrel-base Loading Loading
templates/gitlab-ci-semrel.yml +25 −5 Original line number Diff line number Diff line Loading @@ -611,10 +611,20 @@ stages: yq_version=$(github_get_latest_version mikefarah/yq) yq_binary=yq_linux_amd64 yq_url="https://github.com/mikefarah/yq/releases/download/${yq_version}/${yq_binary}.tar.gz" yq_cache="$XDG_CACHE_HOME/yq-$(echo "$yq_url" | md5sum | cut -d" " -f1)" if [[ -f "$yq_cache" ]] then log_info "yq found in cache: reuse" else log_info "yq not found in cache: download" log_info "Download latest yq version: \\e[32m$yq_url\\e[0m" download_file "${yq_url}" "${yq_binary}.tar.gz" tar xvf "${yq_binary}.tar.gz" mv "${yq_binary}" /usr/bin/yq mkdir -p "$XDG_CACHE_HOME" mv "${yq_binary}" "$yq_cache" fi ln -s "$yq_cache" /usr/bin/yq fi } Loading Loading @@ -745,11 +755,21 @@ stages: - cd "${SEMREL_CONFIG_DIR}" - prepare_semantic_release - install_semantic_release_plugins variables: # download cache XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache" # NPM cache npm_config_cache: "$CI_PROJECT_DIR/.npm" # Cache downloaded dependencies and plugins between builds. # To keep cache across branches add 'key: "$CI_JOB_NAME"' cache: # cache shall be per branch per template key: "$CI_COMMIT_REF_SLUG-SEMREL" when: always paths: - .npm/ - "$CI_PROJECT_DIR/.npm" - "$XDG_CACHE_HOME" semantic-release-info: extends: .semrel-base Loading