From eb115a2391cb582f50fdec9564c177b1d71c2fa7 Mon Sep 17 00:00:00 2001
From: Pierre Smeyers <pierre.smeyers@gmail.com>
Date: Tue, 26 Apr 2022 18:01:14 +0200
Subject: [PATCH] fix: migrate deprecated CI_BUILD_REF_NAME variable

---
 templates/gitlab-ci-python.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/gitlab-ci-python.yml b/templates/gitlab-ci-python.yml
index c125701..eb11f2d 100644
--- a/templates/gitlab-ci-python.yml
+++ b/templates/gitlab-ci-python.yml
@@ -504,7 +504,7 @@ variables:
 
     # 3: Git commit, tag and push
     log_info "--- git push commit and tag..."
-    git push "$git_auth_url" "$CI_BUILD_REF_NAME"
+    git push "$git_auth_url" "$CI_COMMIT_REF_NAME"
     git push "$git_auth_url" --tags
 
     # 4: build new version distribution
@@ -844,7 +844,7 @@ py-release:
   script:
     - git config --global user.email "$GITLAB_USER_EMAIL"
     - git config --global user.name "$GITLAB_USER_LOGIN"
-    - git checkout -B $CI_BUILD_REF_NAME
+    - git checkout -B $CI_COMMIT_REF_NAME
     - configure_scm_auth
     - _release
   artifacts:
-- 
GitLab