add: semverbot config with auto git tag
This commit is contained in:
parent
68184c6e00
commit
df1c38a6f0
@ -33,13 +33,18 @@ build-push:
|
|||||||
#script:
|
#script:
|
||||||
# - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh
|
# - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh
|
||||||
script:
|
script:
|
||||||
- mkdir bin
|
- apk update && apk add git
|
||||||
- curl -o bin/sbot -L https://github.com/restechnica/semverbot/releases/download/v$SEMVERBOT_VERSION/sbot-linux-amd64
|
- git remote remove origin
|
||||||
- chmod +x bin/sbot
|
- git remote add origin https://kamikazechaser:$CI_TOKEN@gitlab.com/$CI_PROJECT_PATH
|
||||||
- echo "RELEASE_VERSION=$(bin/sbot predict version)"
|
- curl -o sbot -L https://github.com/restechnica/semverbot/releases/download/v$SEMVERBOT_VERSION/sbot-linux-amd64
|
||||||
- bin/sbot release version
|
- chmod +x sbot
|
||||||
- bin/sbot push version
|
- ./sbot predict version -m git-commit
|
||||||
- TAG=RELEASE_VERSION sh ./scripts/build-push.sh
|
- export TAG=$(./sbot predict version)
|
||||||
|
- TAG=$TAG sh ./scripts/build.sh
|
||||||
|
- TAG=$TAG sh ./scripts/build-push.sh
|
||||||
|
- TAG=latest sh ./scripts/build-push.sh
|
||||||
|
- git tag -a v$TAG -m "ci tagged"
|
||||||
|
- git push origin v$TAG
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
- if: $CI_COMMIT_REF_PROTECTED == "true"
|
||||||
when: always
|
when: always
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
[git]
|
[git]
|
||||||
|
|
||||||
[git.config]
|
[git.config]
|
||||||
email = "semverbot@github.com"
|
email = "sohailsameja@gmail.com"
|
||||||
name = "semverbot"
|
name = "kamikazechaser"
|
||||||
|
|
||||||
[git.tags]
|
[git.tags]
|
||||||
prefix = "v"
|
prefix = "v"
|
||||||
|
|
||||||
[semver]
|
[semver]
|
||||||
mode = "auto"
|
mode = "git-commit"
|
||||||
|
|
||||||
[semver.detection]
|
[semver.detection]
|
||||||
patch = ["fix:", "[fix]"]
|
patch = ["fix", "[fix]", "patch", "[patch]"]
|
||||||
minor = ["feat:", "[feat]"]
|
minor = ["minor", "[minor]", "feat", "[feat]", "release", "[release]", "bump", "[bump]"]
|
||||||
major = ["release:", "[release]", "BREAKING CHANGE:"]
|
major = ["BREAKING CHANGE"]
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
TAG=${TAG?Variable not set} \
|
TAG=${TAG?Variable not set} \
|
||||||
sh ./scripts/build.sh
|
# sh ./scripts/build.sh
|
||||||
|
|
||||||
docker-compose -f docker-compose.yml push
|
docker-compose -f docker-compose.yml push
|
||||||
|
Loading…
Reference in New Issue
Block a user