forked from intercom/intercom-cordova
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
101 lines (97 loc) · 3 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: 2
jobs:
ios:
macos:
xcode: "13.0.0"
shell: /bin/bash --login -eo pipefail
steps:
- checkout
- run:
name: Install node/npm
command: command -v node || brew install node
- run:
name: Install Cordova
command: npm install -g cordova@9.0.0
- run:
name: Add iOS platform
command: cd Example && cordova platform add ios
- run:
name: Install intercom plugin
command: cd Example && cordova plugin add ../intercom-plugin
- run:
name: Build
command: cd Example && cordova build ios --buildFlag="-UseModernBuildSystem=0"
android:
docker:
- image: circleci/android:api-30
environment:
- JVM_OPTS: -Xmx3200m
working_directory: ~/project/Example
steps:
- checkout
- run:
name: Accept all Android licenses
command: |
yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses || if [ $? -ne '141' ]; then exit $?; fi;
- run:
name: Install node/npm
command: |
curl -O https://packages.cloud.google.com/apt/doc/apt-key.gpg && sudo apt-key add apt-key.gpg
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install -y nodejs
- run:
name: Install gradle
command: sudo apt-get install gradle
- run:
name: Install Cordova
command: sudo npm install -g cordova@9.0.0
- run:
name: Add Android platform
command: cd Example && cordova platform add android@10.0.0
- run:
name: Install intercom plugin
command: cd Example && cordova plugin add ../intercom-plugin
- run:
name: Remove whitelist plugin
command: cd Example && cordova plugin rm cordova-plugin-whitelist
- run:
name: Build
command: cd Example && cordova build android --verbose -- --gradleArg=--stacktrace
publish:
docker:
- image: circleci/android:api-28
steps:
- checkout
- run:
name: Install node/npm
command: |
curl -O https://packages.cloud.google.com/apt/doc/apt-key.gpg && sudo apt-key add apt-key.gpg
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt install -y nodejs
- run:
name: Publish to npm
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > intercom-plugin/.npmrc
npm config set scope $ORG_NAME
cd intercom-plugin && npm publish
workflows:
version: 2
ios_and_android:
jobs:
- ios:
filters:
tags:
only: /[0-9]+(\.[0-9]+)+/
- android:
filters:
tags:
only: /[0-9]+(\.[0-9]+)+/
- publish:
requires:
- ios
- android
filters:
tags:
only: /[0-9]+(\.[0-9]+)+/
branches:
ignore: /.*/