File tree Expand file tree Collapse file tree 2 files changed +34
-16
lines changed
Expand file tree Collapse file tree 2 files changed +34
-16
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,22 @@ workflows:
3232 when :
3333 not : << pipeline.parameters.mapbox_navigation_native_upstream >>
3434 jobs :
35- - release-snapshot
35+ - release-snapshot-start :
36+ type : approval
37+ filters :
38+ branches :
39+ ignore :
40+ - main
41+ - /release-v.*/
42+ - release-snapshot :
43+ requires :
44+ - release-snapshot-start
45+ - release-snapshot :
46+ filters :
47+ branches :
48+ only :
49+ - main
50+ - /release-v.*/
3651 - release :
3752 filters :
3853 tags :
@@ -96,20 +111,6 @@ workflows:
96111# ---------- COMMANDS ----------
97112# ------------------------------
98113commands :
99- check-snapshot-label :
100- steps :
101- - run :
102- name : Check snapshot label
103- command : |
104- if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then
105- PR=$(curl -s $CIRCLE_PULL_REQUEST)
106- fi
107- if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then
108- exit 0
109- else
110- exit 1
111- fi
112-
113114 write-workspace :
114115 steps :
115116 - persist_to_workspace :
@@ -777,7 +778,6 @@ jobs:
777778 executor : ndk-r22-latest-executor
778779 resource_class : medium+
779780 steps :
780- - check-snapshot-label
781781 - checkout
782782 - assemble-core-release
783783 - assemble-ui-release
Original file line number Diff line number Diff line change 1+ name : Run release-snapshot job
2+ on :
3+ pull_request :
4+ types : [ opened, synchronize, labeled ]
5+ jobs :
6+ process :
7+ if : contains(github.event.pull_request.labels.*.name, 'publish-snapshot')
8+ permissions :
9+ pull-requests : write
10+ contents : write
11+ runs-on : ubuntu-20.04
12+ env :
13+ BRANCH_NAME : ${{ github.head_ref }}
14+ CIRCLE_CI_TOKEN : ${{ secrets.CIRCLE_CI_TOKEN }}
15+ steps :
16+ - name : Run release-snapshot job
17+ run : |
18+ curl -X POST -H "Circle-Token: ${CIRCLE_CI_TOKEN}" --header "Content-Type: application/json" --data "{\"build_parameters\":{\"CIRCLE_JOB\":\"release-snapshot\"}}" https://circleci.com/api/v1.1/project/github/mapbox/mapbox-navigation-android/tree/${BRANCH_NAME}
You can’t perform that action at this time.
0 commit comments