diff --git a/gitlab/before_build.sh b/gitlab/before_build.sh
index 22e8b1e2cc28e3b126b7bd9875b20a2a855cfc76..54520c3fb433df5795af0773e33e10af6d34903f 100755
--- a/gitlab/before_build.sh
+++ b/gitlab/before_build.sh
@@ -37,7 +37,7 @@ fi
 
 # When building a tag, do not use beta wheels
 PIPOPTS="${PIPOPTS} --use-wheel --no-index"
-if [ -z "${CI_BUILD_TAG}" ]; then
+if [ -z "${CI_COMMIT_TAG}" ]; then
   PIPOPTS="${PIPOPTS} --pre"
 fi