Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
###############################################################################
# Define rules templates to be used by jobs
###############################################################################
# Rules used by default
.default_rules:
rules:
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when: never
# All branches
- if: $CI_COMMIT_BRANCH
# Build on branches and release tag push
.build_rules:
rules:
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when: never
# All branches
- if: $CI_COMMIT_BRANCH
# Only for protected release tags
- if: $CI_COMMIT_TAG =~ /^release\// && $CI_COMMIT_REF_PROTECTED
# Run semantic release only on $CI_DEFAULT_BRANCH except for release commits
.release_rules:
rules:
# Exclude $CI_DEFAULT_BRANCH of semantic-release commits
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_COMMIT_MESSAGE =~ /^chore\(release\):/
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Run on published release tags
.tag_rules:
rules:
# Only for protected release tags
- if: $CI_COMMIT_TAG =~ /^release\// && $CI_COMMIT_REF_PROTECTED
...