Commit 2153d64d authored by Guilhem Bonnefille's avatar Guilhem Bonnefille
Browse files

fix: limit publish job to tag matching release

This is a common behavior (now) of the release oriented templates.
parent c9de6786
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@ variables:
  PROD_REF: '/^(master|main)$/'
  # default integration ref name (pattern)
  INTEG_REF: '/^develop$/'
  # default release tag name (pattern)
  RELEASE_REF: '/^v?[0-9]+\.[0-9]+\.[0-9]+$/'

# allowed stages depend on your template type (see: orange-opensource.gitlab.io/tbc/doc/dev-guidelines/#stages)
stages:
@@ -327,8 +329,5 @@ packages-publish:
  script:
    - publish
  rules:
    # on integration or production branch(es): manual & non-blocking
    - if: '$CI_COMMIT_REF_NAME =~ $INTEG_REF || $CI_COMMIT_REF_NAME =~ $PROD_REF'
      when: manual
      allow_failure: true
    - if: '$CI_COMMIT_TAG'
    # on tag with release pattern: auto
    - if: '$CI_COMMIT_TAG =~ $RELEASE_REF'