Permalink
Fetching contributors…
Cannot retrieve contributors at this time
38 lines (30 sloc) 1.01 KB
language: android
jdk:
- oraclejdk8
android:
components:
- tools
- platform-tools
- build-tools-28.0.3
- android-28
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_install:
- yes | sdkmanager 'platforms;android-27'
before_script:
- git fetch --unshallow
- version="$(git describe --long --tags | sed 's/^v//;s/-\([0-9]\+\)-g\([0-9a-f]\+\)/+\1.\2/')"
- sed -i 's/versionName .*/versionName "'"${version}"'"/' app/build.gradle
- grep 'versionName' app/build.gradle
- cp signing.properties.travis signing.properties
after_success:
- cp app/build/outputs/apk/release/app-release.apk "douya-ci-${version}.apk"
- >-
description="$(git show -s --format='> Commit: %H%n> Author: %an%n> Date: %ad%n%n%s%+b')"
- ./upload-to-releases.sh 'DreaminginCodeZH/DouyaCiBuilds' "${version}" "${description}" "douya-ci-${version}.apk"
after_failure:
- cat app/build/reports/lint-results*.html