diff --git a/.circleci/config.yml b/.circleci/config.yml index a3a8488a860..7de6e264bcc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,12 +32,7 @@ workflows: when: not: << pipeline.parameters.mapbox_navigation_native_upstream >> jobs: - - release-snapshot: - filters: - branches: - only: - - main - - /release-v.*/ + - release-snapshot - release: filters: tags: @@ -101,6 +96,20 @@ workflows: #---------- COMMANDS ---------- #------------------------------ commands: + check-snapshot-label: + steps: + - run: + name: Check snapshot label + command: | + if [[ -n "$CIRCLE_PULL_REQUEST" ]]; then + PR=$(curl -s $CIRCLE_PULL_REQUEST) + fi + if [[ $CIRCLE_BRANCH == main || $CIRCLE_BRANCH =~ release-v.* || $PR == *"mapbox/mapbox-navigation-android/labels/publish-snapshot"* ]]; then + exit 0 + else + exit 1 + fi + write-workspace: steps: - persist_to_workspace: @@ -768,6 +777,7 @@ jobs: executor: ndk-r22-latest-executor resource_class: medium+ steps: + - check-snapshot-label - checkout - assemble-core-release - assemble-ui-release