Reorder GitLab CI steps for better configuration and clarity in the release stage

This commit is contained in:
2025-08-19 11:39:34 +02:00
parent 5ddc60f1c6
commit d58b2fc0a6
+2 -3
View File
@@ -78,14 +78,13 @@ perform_release:
script: |
apk add --no-cache git
cd ${GITLAB_CLONE_DIR}
# config auth
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
git config --global user.name "${GITLAB_USERNAME}"
git config --global user.email "${GITLAB_USEREMAIL}"
export CI_REF_NAME=${CI_COMMIT_REF_NAME:-release}
git checkout -B ${CI_REF_NAME}
# config auth
git remote set-url origin "https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/${CI_PROJECT_PATH}.git"
# build versions
CURRENT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_VERSION=$(echo $CURRENT_VERSION | sed 's/-SNAPSHOT//')