--- kind: pipeline type: docker name: Android steps: - name: prepare signing image: busybox environment: STOREPASSWORD: from_secret: StorePassword KEYPASSWORD: from_secret: KeyPassword commands: - touch keystore.properties - echo "storePassword=$STOREPASSWORD" >> keystore.properties - echo "keyPassword=$KEYPASSWORD" >> keystore.properties - echo "keyAlias=key0" >> keystore.properties - echo "storeFile=../AndroidKey" >> keystore.properties - name: generate versionCode image: busybox commands: - touch version.properties - let timestamp=$(date +%s)/10 - echo "versionCode=$timestamp" >> version.properties - name: build image: mingc/android-build-box commands: - ./gradlew test - ./gradlew assembleRelease - ./gradlew bundleRelease - name: upload latest apk image: vividboarder/drone-webdav settings: file: app/build/outputs/apk/release/app-release.apk destination: https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/latest/app-release.apk username: from_secret: NextCloudUser password: from_secret: NextCloudPassword - name: upload latest bundle image: vividboarder/drone-webdav settings: file: app/build/outputs/bundle/release/app-release.aab destination: https://nextcloud.zobrist.me/remote.php/dav/files/deploy/TichuCounter/latest/app-release.aab username: from_secret: NextCloudUser password: from_secret: NextCloudPassword - name: upload tagged apk image: vividboarder/drone-webdav settings: file: app/build/outputs/apk/release/app-release.apk destination: https://my.nextcloud.com/remote.php/dav/files/deploy/tagged/app-release$DRONE_TAG.apk username: from_secret: NextCloudUser password: from_secret: NextCloudPassword when: event: - tag - name: upload tagged bundle image: vividboarder/drone-webdav settings: file: app/build/outputs/bundle/release/app-release.aab destination: https://my.nextcloud.com/remote.php/dav/files/deploy/tagged/app-release$DRONE_TAG.aab username: from_secret: NextCloudUser password: from_secret: NextCloudPassword when: event: - tag - name: slack notification image: plugins/slack settings: webhook: from_secret: SlackWebhook when: status: - failure - success