ci: adds version calculation via gitversion and autotagging on defaultbranch

This commit is contained in:
Mr. Finch 2025-01-14 19:30:55 +00:00 committed by Mr Finchum
parent 4f66c686d1
commit ea1812f0f1
4 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,15 @@
---
.git:create_tag:
image: alpine:3.21
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
GIT_LFS_SKIP_SMUDGE: 1
VERSION: ''
TOKEN: '' # Token with push privileges
script:
- apk add git
- git remote set-url origin https://oauth2:$TOKEN@$CI_SERVER_HOST/$CI_PROJECT_PATH
- git tag $VERSION
- git push origin tag $VERSION