Skip to content

Commit

Permalink
Add travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
jmattheis committed Nov 2, 2018
1 parent 8af40c3 commit f867d8a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .travis.yml
@@ -0,0 +1,54 @@
language: android
sudo: required
jdk: openjdk8

notifications:
email: false

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

android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
- extra-google-m2repository
- extra-android-m2repository
licenses:
- android-sdk-preview-license-.+
- android-sdk-license-.+
- google-gdk-license-.+

before_install:
- yes | sdkmanager "platforms;android-28"
- openssl aes-256-cbc -K $encrypted_f6e0f94759d3_key -iv $encrypted_f6e0f94759d3_iv
-in gotify-release-key.jks.enc -out gotify-release-key.jks -d

script:
- ./gradlew clean build --stacktrace

before_deploy:
- cp $TRAVIS_BUILD_DIR/gotify-release-key.jks $HOME
- cd app/build/outputs/apk/release
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore $HOME/gotify-release-key.jks
-storepass $STOREPASS -keypass $KEYPASS app-release-unsigned.apk gotify-release-key
- jarsigner -verify app-release-unsigned.apk
- "${ANDROID_HOME}/build-tools/28.0.3/zipalign -v 4 app-release-unsigned.apk Gotify.apk"

deploy:
provider: releases
file: Gotify.apk
api_key: $GH_TOKEN
skip_cleanup: true
on:
repo: gotify/android
tags: true
jdk: openjdk8
Binary file added gotify-release-key.jks.enc
Binary file not shown.

0 comments on commit f867d8a

Please sign in to comment.