Skip to content

Commit bd80902

Browse files
Nhi Nguyennhi-nguyen
authored andcommitted
CircleCI: Add tag filter for publish's upstream jobs
“CircleCI does not run workflows for tags unless you explicitly specify tag filters. Additionally, if a job requires any other jobs (directly or indirectly), you must specify tag filters for those jobs."
1 parent df1f09d commit bd80902

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.circleci/config.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
version: 2
2+
defaults:
3+
taggedReleasesFilter: &taggedReleasesFilter
4+
tags:
5+
only: /^\d+\.\d+\.\d+((a|b|rc)\d)?$/ # matches 1.2.3, 1.2.3a1, 1.2.3b1, 1.2.3rc1 etc..
26
jobs:
37
build:
48
docker:
@@ -81,11 +85,21 @@ workflows:
8185
version: 2
8286
build_test_release:
8387
jobs:
84-
- build
85-
- test_27
86-
- test_34
87-
- test_35
88-
- test_36
88+
- build:
89+
filters:
90+
<<: *taggedReleasesFilter
91+
- test_27:
92+
filters:
93+
<<: *taggedReleasesFilter
94+
- test_34:
95+
filters:
96+
<<: *taggedReleasesFilter
97+
- test_35:
98+
filters:
99+
<<: *taggedReleasesFilter
100+
- test_36:
101+
filters:
102+
<<: *taggedReleasesFilter
89103
- publish:
90104
requires:
91105
- build
@@ -94,10 +108,9 @@ workflows:
94108
- test_35
95109
- test_36
96110
filters:
111+
<<: *taggedReleasesFilter
97112
branches:
98113
ignore: /.*/
99-
tags:
100-
only: /^\d+\.\d+\.\d+((a|b|rc)\d)?$/ # matches 1.2.3, 1.2.3a1, 1.2.3b1, 1.2.3rc1 etc..
101114
static_analysis:
102115
jobs:
103116
- build

0 commit comments

Comments
 (0)