forked from nguyenson2012/react-native-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (93 loc) · 3.35 KB
/
.travis.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
# only build develop, master & travis branch
# automatically publish to Playstore Alpha & Appstore Testflight after master build completes
branches:
only:
- master
- develop
- android-alpha
- ios-testflight
language: node_js
node_js: 10.16.0
before_install:
- nvm install 10.16.0
# apply production configuration
- openssl aes-256-cbc -K $encrypted_178f17f19164_key -iv $encrypted_178f17f19164_iv -in production.zip.enc -out production.zip -d
- unzip -o production.zip
- npm install -g yarn
- yarn
jobs:
include:
- stage: Validate
script: yarn job production &&
yarn validate &&
yarn coveralls
- stage: Build iOS
if: branch = master OR branch = develop
os: osx
osx_image: xcode10.2
before_script:
- bundle install
- cd ios && pod install --repo-update && cd ..
script: yarn job production &&
yarn ios:build
- stage: Release iOS to Testflight
if: branch = ios-testflight
os: osx
osx_image: xcode10.2
before_script:
- bundle install
- cd ios && pod install --repo-update && cd ..
script:
# itms is needed, otherwise altool will not work correctly
yarn job production &&
yarn job update-version &&
yarn ios:build &&
ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool" /usr/local/bin/altool &&
ln -s "/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms" /usr/local/bin/itms &&
altool --upload-app -f "mobile.ipa" -u $APPLE_USERNAME -p $APPLE_APPLICATION_SPECIFIC_PASSWORD
- stage: Build Android
if: branch = master OR branch = develop
language: android
jdk: oraclejdk8
dist: trusty
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
before_script:
- gem install bundler
- bundle install
# https://stackoverflow.com/questions/54273412/failed-to-install-the-following-android-sdk-packages-as-some-licences-have-not-b
- mkdir "$ANDROID_HOME/licenses" || true
- echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
script: yarn job production &&
yarn job update-version &&
yarn android:build
- stage: Release Android to Alpha
if: branch = android-alpha
language: android
jdk: oraclejdk8
dist: trusty
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
before_script:
- gem install bundler
- bundle install
# https://stackoverflow.com/questions/54273412/failed-to-install-the-following-android-sdk-packages-as-some-licences-have-not-b
- mkdir "$ANDROID_HOME/licenses" || true
- echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
script: yarn job production &&
yarn job update-version &&
yarn android:alpha