forked from expo/turtle-cli-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (143 loc) · 5.46 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
language: java
node_js: "8.12"
sudo: false
branches:
only:
- master
env:
global:
- EXPO_SDK_VERSION="35.0.0"
- TURTLE_VERSION="0.12.10"
- YARN_VERSION="1.10.1"
jobs:
include:
- stage: publish app
env:
- CACHE_NAME=publish YARN_CACHE_FOLDER="/home/travis/yarn_cache"
cache:
directories:
- $HOME/yarn_cache
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn global add expo-cli
script:
- expo login -u $EXPO_USERNAME -p $EXPO_PASSWORD --non-interactive
- yarn
- expo publish
- stage: build standalone apps
env:
- CACHE_NAME=build-android-v2 YARN_CACHE_FOLDER="/home/travis/yarn_cache"
jdk:
- openjdk8
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
- $HOME/.gradle/wrapper
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- pip install --user awscli
- yarn global add gulp-cli turtle-cli@$TURTLE_VERSION
script:
- export ARTIFACT_PATH="/home/travis/expo-project-$TRAVIS_COMMIT-`date +%s`.apk"
- turtle setup:android --sdk-version $EXPO_SDK_VERSION > /dev/null || travis_terminate 1
- echo $EXPO_ANDROID_KEYSTORE_BASE64 > expo-project.jks.base64
- base64 --decode expo-project.jks.base64 > expo-project.jks
- turtle build:android
--keystore-path ./expo-project.jks
--keystore-alias $EXPO_ANDROID_KEYSTORE_ALIAS
--type apk
-o $ARTIFACT_PATH
after_success:
- aws s3 cp $ARTIFACT_PATH s3://$AWS_BUCKET/`basename $ARTIFACT_PATH`
- stage: build standalone apps
env:
- CACHE_NAME=build-android-v2 YARN_CACHE_FOLDER="/home/travis/yarn_cache"
jdk:
- openjdk8
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
- $HOME/.gradle/wrapper
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- pip install --user awscli
- yarn global add gulp-cli turtle-cli@$TURTLE_VERSION
script:
- export ARTIFACT_PATH="/home/travis/expo-project-$TRAVIS_COMMIT-`date +%s`.aab"
- turtle setup:android --sdk-version $EXPO_SDK_VERSION > /dev/null || travis_terminate 1
- echo $EXPO_ANDROID_KEYSTORE_BASE64 > expo-project.jks.base64
- base64 --decode expo-project.jks.base64 > expo-project.jks
- turtle build:android
--keystore-path ./expo-project.jks
--keystore-alias $EXPO_ANDROID_KEYSTORE_ALIAS
--type app-bundle
-o $ARTIFACT_PATH
after_success:
- aws s3 cp $ARTIFACT_PATH s3://$AWS_BUCKET/`basename $ARTIFACT_PATH`
- stage: build standalone apps
os: osx
osx_image: xcode11.2
language: node_js
node_js: "8.12"
env:
- CACHE_NAME=build-ios-simulator YARN_CACHE_FOLDER="/Users/travis/yarn_cache"
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- pip install --user awscli
- export PATH=/Users/travis/Library/Python/2.7/bin:$PATH
- yarn global add turtle-cli@$TURTLE_VERSION
script:
- export ARTIFACT_PATH="/Users/travis/expo-project-$TRAVIS_COMMIT-`date +%s`.tar.gz"
- turtle setup:ios --sdk-version $EXPO_SDK_VERSION || travis_terminate 1
- turtle build:ios
--team-id $EXPO_APPLE_TEAM_ID
--type simulator
-o $ARTIFACT_PATH
after_success:
- aws s3 cp $ARTIFACT_PATH s3://$AWS_BUCKET/`basename $ARTIFACT_PATH`
- stage: build standalone apps
os: osx
osx_image: xcode11.2
language: node_js
node_js: "8.12"
env:
- CACHE_NAME=build-ios-ipa YARN_CACHE_FOLDER="/Users/travis/yarn_cache"
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- pip install --user awscli
- export PATH=/Users/travis/Library/Python/2.7/bin:$PATH
- yarn global add turtle-cli@$TURTLE_VERSION
script:
- export ARTIFACT_PATH="/Users/travis/expo-project-$TRAVIS_COMMIT-`date +%s`.ipa"
- turtle setup:ios --sdk-version $EXPO_SDK_VERSION || travis_terminate 1
- echo $EXPO_IOS_DIST_P12_BASE64 > expo-project_dist.p12.base64
- base64 --decode expo-project_dist.p12.base64 > expo-project_dist.p12
- echo $EXPO_IOS_PROVISIONING_PROFILE_BASE64 > expo-project.mobileprovision.base64
- base64 --decode expo-project.mobileprovision.base64 > expo-project.mobileprovision
- turtle build:ios
--team-id $EXPO_APPLE_TEAM_ID
--dist-p12-path ./expo-project_dist.p12
--provisioning-profile-path ./expo-project.mobileprovision
-o $ARTIFACT_PATH
after_success:
- aws s3 cp $ARTIFACT_PATH s3://$AWS_BUCKET/`basename $ARTIFACT_PATH`