-
Notifications
You must be signed in to change notification settings - Fork 114
/
circle.yml
97 lines (91 loc) · 2.78 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
version: 2.1
orbs:
android: circleci/[email protected]
setup_ruby: &setup_ruby
run:
name: Setup Ruby
command: sed -i '' 's/.*chruby ruby.*/chruby ruby-3.3.0/' ~/.bash_profile
jobs:
ios:
macos:
xcode: "15.4.0"
resource_class: macos.m1.large.gen1
shell: /bin/bash --login -eo pipefail
steps:
- <<: *setup_ruby
- checkout
- run:
name: Install node/npm
command: command -v node || brew install node
- run:
name: Install Cordova
command: npm install -g cordova
- run:
name: Add iOS platform
command: cd Example && cordova platform add ios@latest
- run:
name: Install intercom plugin
command: cd Example && cordova plugin add ../intercom-plugin
- run:
name: Build
command: cd Example && cordova build ios
android:
executor:
name: android/android-machine
resource-class: large
tag: default
environment:
GRADLE_OPTS: -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.daemon=false -Dorg.gradle.caching=true -Dorg.gradle.configureondemand=true -Dkotlin.compiler.execution.strategy=in-process -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=512m" -Dorg.gradle.workers.max=2
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 Cordova
command: npm install -g [email protected]
- run:
name: Add Android platform
command: cd Example && cordova platform add android@latest
- 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:
executor:
name: android/android-machine
resource-class: large
tag: default
steps:
- checkout
- 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.1
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: /.*/