forked from intercom/intercom-cordova
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
94 lines (90 loc) · 2.53 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
version: 2
jobs:
ios:
macos:
xcode: "9.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
- run:
name: Setup CocoaPods
command: curl -sS https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash
- 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
android:
docker:
- image: circleci/android:api-26-alpha
environment:
- JVM_OPTS: -Xmx3200m
working_directory: ~/project/Example
steps:
- checkout
- run:
name: Install node/npm
command: |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
- run:
name: Install gradle
command: sudo apt-get install gradle
- run:
name: Install Cordova
command: sudo npm install -g cordova
- run:
name: Add Android platform
command: cd Example && cordova platform add android
- run:
name: Install intercom plugin
command: cd Example && cordova plugin add ../intercom-plugin
- run:
name: Build
command: cd Example && cordova build android --verbose -- --gradleArg=--stacktrace
publish:
docker:
- image: circleci/android:api-26-alpha
steps:
- checkout
- run:
name: Install node/npm
command: |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
- run:
name: Publish to npm
command: |
echo -e "$NPM_USER\n$NPM_PASSWORD\n$NPM_EMAIL" | npm login
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: /.*/