forked from kevinhinterlong/archwiki-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
73 lines (65 loc) · 2.68 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
language: android
jdk: oraclejdk8
sudo: false
env:
global:
- ANDROID_API=29
- EMULATOR_API=21
- ANDROID_BUILD_TOOLS=29.0.2
android:
components:
- build-tools-$ANDROID_BUILD_TOOLS
- android-$ANDROID_API
- android-$EMULATOR_API
- extra-android-support
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
- sys-img-armeabi-v7a-android-$EMULATOR_API
before_install:
- if [ -n "$TRAVIS_TAG" ]; then echo "Decrypting upload config"; openssl aes-256-cbc
-K $encrypted_da56e498cb22_key -iv $encrypted_da56e498cb22_iv -in upload_config.tar.enc
-out upload_config.tar -d; echo "Successfully decrypted files"; tar xvf upload_config.tar;
mv upload_config/upload.json app/upload.json; mv upload_config/upload.keystore app/upload.keystore;
fi
- "./gradlew lint"
before_script:
- echo no | android create avd --force -n test -t android-$EMULATOR_API --abi armeabi-v7a
- emulator -avd test -no-skin -no-audio -no-window &
- android-wait-for-emulator
- adb shell input keyevent 82 &
script: "./gradlew build test connectedAndroidTest"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
directories:
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
- "$HOME/.android/build-cache"
before_deploy:
- cd app/build/outputs/apk/release/; ls -la; md5sum archwiki-viewer-*.apk > md5sum.txt;
sha1sum archwiki-viewer-*.apk > sha1sum.txt; cd -
deploy:
skip_cleanup: true
provider: releases
api_key:
secure: F/LqVUBz5fMT28Av5NT3uGUYMxMepkk1XjL7XD/rtlwh1ApJjQDdwEBDSuFiXIqMv5ru8Gvo6u8HsiEJurnuiJ16wkTdyGDvGQffGmm2OIAko6fnlRpKvboN03eEuHElONqHzX792QMCUcSM6YnkSPJdydxhza1BRHnYsECLPcGQzp6CFNKCkVOsfX0XO7dSuZwVKZJufRDLbInaJgAYuKRjeG5Qj+3tM6WDUqOaVroSxeN8cfW14OSShTgXYYtZBYEcrt3p75/9qftMMPVAd5599/voFYJZHMzvZ321dEB84FJX1woY7MJp/tJMdfTVYuUEtYY9XwoR4H/DW+dvwlFFz+v/bNyCoV30KIZm/L7ohNeH5zbLA8bAbHFOcsOW3gXMxgv4gCquenh5/9xDUOIX8CQmjwcvmNzNcx7SxoIuOe2ghttVBziNQPL6D+Xbnd+W7uzlLLleJGnhVomkomFYhwy29a+/fM1gjKRJ7H/VruqCzfWMoXDektSoD3BLAR5Ckm9WRvEPQW5R1Q8gk4Bt13if43GwtI83qh8UQjleJLiVRm6e7HsGqoLnjCoN6gRDx0oo+h3S2vrp4QBe9vOZuCurWXrHDdf5CtuwSAFTpYoT9EF8IfOZ3sXrwRSdtsJaiactj1h2cUK2FJ0Rgy6gxHqeT1sh8HeRetQJZAQ=
file_glob: true
name: $TRAVIS_TAG
file:
- app/build/outputs/apk/release/archwiki-viewer-*.apk
- app/build/outputs/apk/release/md5sum.txt
- app/build/outputs/apk/release/sha1sum.txt
on:
repo: kevinhinterlong/archwiki-viewer
tags: true
after_deploy:
- echo "Checking if tag matches v.X.Y.Z"
- if [[ $TRAVIS_TAG =~ v[0-9]+\.[0-9]+\.[0-9]+ ]] ; then ./gradlew publishRelease;
fi
notifications:
webhooks:
on_success: change
on_failure: always
on_start: never