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