Hello guys
I have a Golang project, and I want CI to run deploy
job when “version” tag was pushed (for example v0.1.0
). To do this, I have following line in my .gitlab-ci.yml
file:
stages:
- deploy_windows
.............
deploy:
stage: deploy_windows
script:
- go build -ldflags "-s -w -extldflags '-static'" -o $CI_PROJECT_DIR/app.exe
artifacts:
paths:
- $CI_PROJECT_DIR/app.exe
only:
- tags /^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$/
- refs master
This regex looks like correct (you can quickly try it here: https://regexr.com/45g30), and syntax is ok, but after I push my tag v0.1.0
, GitLab CI does not include this job in pipeline, it only include test
and build
.
Have you any suggestion why it goes this way?