include:
- local: '.gitlab/templates.yml'
image: registry.gitlab.com/wizrds/rust-python-docker:1.81_3.12
stages: !reference [.stages, stages]
bump_version:
stage: bump
variables:
REPO_URL: "https://release-token:${RELEASE_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
before_script:
- export PATH=$PATH:$(pwd)
- git config --global user.email "$GIT_COMMIT_EMAIL"
- git config --global user.name "$GIT_COMMIT_USER"
- git checkout $CI_COMMIT_BRANCH
- git pull $REPO_URL $CI_COMMIT_BRANCH
script:
- |
if ! task version:bump; then
echo "Version unchanged."
else
echo "Version changed."
git push $REPO_URL $CI_COMMIT_BRANCH --tags
fi