image: registry.gitlab.com/fdroid/ci-images-client:latest cashier_test: stage: test only: changes: - cashier/**/* - taler-kotlin-common/**/* - taler-kotlin-android/**/* - build.gradle script: ./gradlew :cashier:check :cashier:assembleRelease artifacts: paths: - cashier/build/reports/lint-results.html expire_in: 1 week cashier_deploy_nightly: stage: deploy resource_group: deploy_nightly only: refs: - master changes: - cashier/**/* needs: ["cashier_test"] script: # Ensure that key exists - test -z "$DEBUG_KEYSTORE" && exit 0 # Rename nightly app - sed -i 's,.*,Cashier Nightly,' cashier/src/main/res/values*/strings.xml # Set time-based version code - export versionCode=$(date '+%s') - sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," cashier/build.gradle # Set nightly application ID - sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.cashier.nightly\"," cashier/build.gradle # Build the APK - ./gradlew :cashier:assembleRelease # Rename APK, so fdroid nightly accepts it (looks for *-debug.apk) - mv cashier/build/outputs/apk/release/*.apk cashier-debug.apk # install fdroidserver and dependencies for nightly publishing - apt update && apt-get -qy install --no-install-recommends fdroidserver openssh-client # backport fix from https://gitlab.com/fdroid/fdroidserver/-/merge_requests/1078 - sed -e '/common.apk_strip_v1_signatures/ s/^#*/#/' -i /usr/lib/python3/dist-packages/fdroidserver/nightly.py - fdroid --version - CI_PROJECT_URL="https://gitlab.com/gnu-taler/fdroid-repo" CI_PROJECT_PATH="gnu-taler/fdroid-repo" fdroid nightly -v