Last active
July 22, 2019 11:34
-
-
Save jtbonhomme/eeb3808369698da0203fe83259c212ef to your computer and use it in GitHub Desktop.
Gitlab-CI release job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.release-script: &release-script | |
- # this part allow the script to push tags on gitlab repos | |
- git remote set-url origin "https://${REGISTRY_USER}:${REGISTRY_TOKEN}@${GITLAB_URL}/${CI_PROJECT_PATH}.git" | |
- git config --global user.email '${REGISTRY_USER}@${DOMAIN}' | |
- git config --global user.name '${REGISTRY_USER}' | |
- # this part uses commit messages and semantic versioning to define a version number | |
- DEBUG=* semantic-release | |
- git push --tags || true | |
release: | |
image: ${REGISTRY_URL}/release:latest | |
stage: release | |
only: | |
- master | |
tags: | |
- docker | |
script: *release-script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment