Skip to content

Commit d3e5fad

Browse files
mattipfmassa
andauthored
add CI qualifier to push docs for new tags (#3373)
Co-authored-by: Francisco Massa <[email protected]>
1 parent 5c2a448 commit d3e5fad

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,8 @@ workflows:
13251325
branches:
13261326
only:
13271327
- nightly
1328+
tags:
1329+
only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
13281330
name: upload_docs
13291331
python_version: '3.7'
13301332
requires:

.circleci/regenerate.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
2323
CUDA_VERSION = ["10.1", "10.2", "11.2"]
2424

25+
RC_PATTERN = r"/v[0-9]+(\.[0-9]+)*-rc[0-9]+/"
26+
2527

2628
def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, windows_latest_only=False):
2729
w = []
@@ -91,7 +93,8 @@ def upload_doc_job(filter_branch):
9193
}
9294

9395
if filter_branch:
94-
job["filters"] = gen_filter_branch_tree(filter_branch)
96+
job["filters"] = gen_filter_branch_tree(filter_branch,
97+
tags_list=RC_PATTERN)
9598
return [{"upload_docs": job}]
9699

97100

@@ -151,8 +154,11 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version,
151154
return {w: d}
152155

153156

154-
def gen_filter_branch_tree(*branches):
155-
return {"branches": {"only": [b for b in branches]}}
157+
def gen_filter_branch_tree(*branches, tags_list=None):
158+
filter_dict = {"branches": {"only": [b for b in branches]}}
159+
if tags_list is not None:
160+
filter_dict["tags"] = {"only": tags_list}
161+
return filter_dict
156162

157163

158164
def generate_upload_workflow(base_workflow_name, os_type, btype, cu_version, *, filter_branch=None):

0 commit comments

Comments
 (0)