1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00
fcast/receivers/android/.gitlab-ci.yml
2023-06-26 15:40:17 +02:00

22 lines
1.2 KiB
YAML

buildAndDeployApk:
stage: buildAndDeployApk
before_script:
- cd receivers/android
script:
- if [ -z "$ANDROID_VERSION_NAME" ] || [ -z "$ANDROID_VERSION_CODE" ]; then echo "Version name or code not specified. Skipping build."; exit 0; fi
- ./gradlew --stacktrace assembleRelease -PversionName=$ANDROID_VERSION_NAME -PversionCode=$ANDROID_VERSION_CODE
- cp ./app/build/outputs/apk/release/app-release.apk /var/www/html/fcast-release.apk
- cp ./app/build/outputs/apk/release/app-release.apk /var/www/html/fastcast-release.apk
- echo $ANDROID_VERSION_CODE > /var/www/html/fastcast-version.txt
- echo $ANDROID_VERSION_CODE > /var/www/html/fcast-version.txt
when: manual
buildAndDeployPlayStoreAab:
stage: buildAndDeployPlayStoreAab
before_script:
- cd receivers/android
script:
- if [ -z "$ANDROID_VERSION_NAME" ] || [ -z "$ANDROID_VERSION_CODE" ]; then echo "Version name or code not specified. Skipping build."; exit 0; fi
- ./gradlew --stacktrace bundlePlaystoreRelease -PversionName=$ANDROID_VERSION_NAME -PversionCode=$ANDROID_VERSION_CODE
- cp ./app/build/outputs/bundle/playstoreRelease/app-playstore-release.aab /var/www/html/fcast-playstore-release.aab
when: manual