From 25c75a12182a953dd4622d13d07035584ef11802 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Tue, 7 Sep 2021 16:29:58 -0700 Subject: [PATCH] add semver --- .gitlab-ci.yml | 9 ++++++++- .semverbot.toml | 17 +++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .semverbot.toml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c81b3e0..5178d085 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,14 @@ build-push: #script: # - TAG=$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA sh ./scripts/build-push.sh script: - - TAG=latest sh ./scripts/build-push.sh + - 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=$(sbot predict version)" + - echo "current version: $(sbot get version)" + - echo "next version: $RELEASE_VERSION" + - sbot release version + - sbot push version + - TAG=RELEASE_VERSION sh ./scripts/build-push.sh rules: - if: $CI_COMMIT_REF_PROTECTED == "true" when: always diff --git a/.semverbot.toml b/.semverbot.toml new file mode 100644 index 00000000..a50b2e03 --- /dev/null +++ b/.semverbot.toml @@ -0,0 +1,17 @@ +[git] + +[git.config] +email = "semverbot@github.com" +name = "semverbot" + +[git.tags] +prefix = "v" + +[semver] +mode = "auto" + +[semver.detection] +patch = ["fix:", "[fix]"] +minor = ["feat:", "[feat]"] +major = ["release:", "[release]", "BREAKING CHANGE:"] +