Commit d851c7ad authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'rhtenhove-beta-patch-44780' into 'beta'

fix: use tbump version for badge version

See merge request just-ci/templates!41
parents 955dc21e cc85ce71
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
#     LABEL: "version"
#     VALUE: "1.2.3"
#     COLOR: "red"
#     URL: "${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}"
#     URL: "${CI_PROJECT_URL}"
#     BADGE_NAME: ""  # Optional. Name of the badge in Settings. Defaults to $LABEL

# Make sure your_custom_job is replaced and unique, and you've changed the variables
+10 −5
Original line number Diff line number Diff line
@@ -31,14 +31,19 @@ semantic-release:
        fi
      done
    - semantic-release ${EXTRA_ARGS}
  only:
    variables:
      - $GL_TOKEN
  rules:
    - if: '$GL_TOKEN'

badge:semantic-release:
  extends: .badge
  before_script:  # We can't do this in rules as this variable is created during the pipeline run.
    - |
      if [ -z "${TBUMP_NEXT_VERSION}" ]; then
        echo "[!] No next version."
        exit 0
      fi
  variables:
    NAME: "version"
    VALUE: "${CI_COMMIT_TAG}"
    VALUE: "v${TBUMP_NEXT_VERSION}"
    COLOR: "green"
    URL: "${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}"
    URL: "${CI_PROJECT_URL}/tags/v${TBUMP_NEXT_VERSION}"