-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (101 loc) · 3.58 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
language: java
branches:
only:
- master
env:
global:
- EXPO_SDK_VERSION="${APP_EXPO_SDK_VERSION}"
- TURTLE_VERSION="${TURTLE_VERSION_NEW}"
- NODE_VERSION="12.13.1"
- YARN_VERSION="1.21.1"
jobs:
include:
- stage: publish app
env:
- CACHE_NAME=publish YARN_CACHE_FOLDER="/home/travis/yarn_cache"
cache:
directories:
- $HOME/yarn_cache
before_install:
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- 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-v3 YARN_CACHE_FOLDER="/home/travis/yarn_cache"
jdk: openjdk8
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
- $HOME/.gradle/wrapper
before_install:
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn global add gulp-cli turtle-cli@$TURTLE_VERSION
script:
- yarn
- export PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
- export ARTIFACT_PATH="/home/travis/supermunchkin-$TRAVIS_COMMIT-`date +%s`.apk"
- turtle setup:android --sdk-version $EXPO_SDK_VERSION || 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
deploy:
provider: releases
tag_name: "v${PACKAGE_VERSION}"
name: "Version v${PACKAGE_VERSION}"
api_key: "${GITHUB_API_KEY}"
file: "${ARTIFACT_PATH}"
cleanup: true
draft: true
- stage: build standalone apps
env:
- CACHE_NAME=build-android-v3 YARN_CACHE_FOLDER="/home/travis/yarn_cache"
jdk: openjdk8
cache:
directories:
- $HOME/.turtle
- $HOME/yarn_cache
- $HOME/.gradle/wrapper
before_install:
- nvm install $NODE_VERSION
- nvm use $NODE_VERSION
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
- export PATH="$HOME/.yarn/bin:$PATH"
install:
- yarn global add gulp-cli turtle-cli@$TURTLE_VERSION
script:
- yarn
- export PACKAGE_VERSION=$(node -p -e "require('./package.json').version")
- export ARTIFACT_PATH="/home/travis/supermunchkin-$TRAVIS_COMMIT-`date +%s`.aab"
- turtle setup:android --sdk-version $EXPO_SDK_VERSION || 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
deploy:
provider: releases
tag_name: "v${PACKAGE_VERSION}"
name: "Version v${PACKAGE_VERSION}"
api_key: "${GITHUB_API_KEY}"
file: "${ARTIFACT_PATH}"
cleanup: true
draft: true