diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 10c18f704cea30493234c70e07cc6c5369ac8687..58d6a1bcfb0e0f568bf7bb6a2f1429b202336536 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: openjdk:8-jdk
+image: registry.gitlab.com/fdroid/ci-images-client:latest
 
 variables:
   ANDROID_SDK_TOOLS:   "4333796"
@@ -26,8 +26,28 @@ stages:
 
 assembleDebug:
   stage: build
+  except:
+  - master
   script:
     - ./gradlew assembleDebug
   artifacts:
+    expire_in: 3 days
     paths:
     - app/build/outputs/
+
+publish:
+  stage: build
+  only:
+  - master
+  script:
+  # generate new version
+  - export versionCode="$CI_JOB_ID"
+  - export versionName="$(git describe --tag --abbrev=0)-${CI_JOB_ID}_${CI_COMMIT_REF_NAME}"
+  - echo "set VersionCode '${versionCode}' and VersonName '${versionName}'"
+  - sed -i "s/^\(\s*versionCode\s*\).*$/\1$versionCode/" app/build.gradle
+  - sed -i "0,/versionName/s/^\(\s*versionName\).*/\1 \"$versionName\"/" app/build.gradle
+  - cat -n app/build.gradle
+  # build free version
+  - ./gradlew assembleDebug
+  # publish on nightly fdroid repo
+  - fdroid nightly -v
diff --git a/README.md b/README.md
index 2368df8066864602afd0944a13eb23197487dc76..a0e789378f85b7c510a780b680778ef24063e9c9 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,6 @@
 
 ## Download
 
-Latest Build binary from ci here:
+Per F-Droid nightly repository:
 
-[Debug-Binary](https://git.card10.badge.events.ccc.de/card10/companion-app-android/-/jobs/artifacts/master/raw/app/build/outputs/apk/debug/app-debug.apk?inline=false&job=assembleDebug)
+[![https://git.card10.badge.events.ccc.de/card10/companion-app-android-nightly/raw/master/fdroid/repo](https://git.card10.badge.events.ccc.de/card10/companion-app-android-nightly/raw/master/icon.png)](https://git.card10.badge.events.ccc.de/card10/companion-app-android-nightly/raw/master/fdroid/repo)