Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,22 @@ workflows:
when:
not: << pipeline.parameters.mapbox_navigation_native_upstream >>
jobs:
- release-snapshot
- release-snapshot-start:
type: approval
filters:
branches:
ignore:
- main
- /release-v.*/
- release-snapshot:
requires:
- release-snapshot-start
- release-snapshot:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you have 2 jobs with the same name?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one job. We run it by:

  • main and release branches
  • approval in circle ci
  • set PR label

filters:
branches:
only:
- main
- /release-v.*/
- release:
filters:
tags:
Expand Down Expand Up @@ -96,20 +111,6 @@ 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:
Expand Down Expand Up @@ -777,7 +778,6 @@ jobs:
executor: ndk-r22-latest-executor
resource_class: medium+
steps:
- check-snapshot-label
- checkout
- assemble-core-release
- assemble-ui-release
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/run_release_snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Run release-snapshot job
on:
pull_request:
types: [ opened, synchronize, labeled ]
jobs:
process:
if: contains(github.event.pull_request.labels.*.name, 'publish-snapshot')
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-20.04
env:
BRANCH_NAME: ${{ github.head_ref }}
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
steps:
- name: Run release-snapshot job
run: |
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}