Skip to content

Commit ea8e0fd

Browse files
Nik SamokhvalovNik Samokhvalov
authored andcommitted
ci: allow publish job in web tag pipelines
- Use CI_COMMIT_REF_NAME when CI_COMMIT_TAG is not set - Include rule for web-triggered pipelines on tag refs
1 parent 38b7d33 commit ea8e0fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ cli:npm:publish:
149149
# - v0.14.0-dev.1
150150
# - 0.14.0-dev.1
151151
# - 0.14-dev.1 (normalized to 0.14.0-dev.1)
152-
RAW_TAG="${CI_COMMIT_TAG:-}"
152+
RAW_TAG="${CI_COMMIT_TAG:-${CI_COMMIT_REF_NAME:-}}"
153153
if [ -z "$RAW_TAG" ]; then
154154
echo "CI_COMMIT_TAG is empty"
155155
exit 1
@@ -188,6 +188,7 @@ cli:npm:publish:
188188
- rm -f ~/.npmrc
189189
rules:
190190
- if: '$CI_COMMIT_TAG =~ /^v?\\d+\\.\\d+(\\.\\d+)?-(dev|beta)\\.\\d+$/'
191+
- if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_REF_NAME =~ /^v?\\d+\\.\\d+(\\.\\d+)?-(dev|beta)\\.\\d+$/'
191192

192193
cli:node:e2e:dind:
193194
stage: test

0 commit comments

Comments
 (0)