Commit f7b5625e authored by Wilko Manger's avatar Wilko Manger

Merge branch 'fdroid' into 'master'

Upload APK to F-Droid

See merge request !7
parents c6dee54b 22af23d8
Pipeline #264 passed with stages
in 3 minutes and 5 seconds
stages:
- build
- deploy
.only-changes: &only_changes
changes:
- app/**/*
- "*gradle*"
.build:defaults: &build_defaults
stage: build
image: thyrlian/android-sdk:latest
......@@ -12,9 +21,7 @@
build:debug:
<<: *build_defaults
only:
changes:
- app/**/*
- "*gradle*"
<<: *only_changes
except:
variables:
- $DEBUG_STORE
......@@ -26,9 +33,7 @@ build:debug:
build:debug-signed:
<<: *build_defaults
only:
changes:
- app/**/*
- "*gradle*"
<<: *only_changes
refs:
- branches
variables:
......@@ -53,3 +58,22 @@ build:release-signed:
- mv app/build/outputs/apk/releaseCi/app-releaseCi.apk pattle.apk
after_script:
- rm app/release.keystore
.deploy:defaults: &deploy_defaults
stage: deploy
tags:
- fdroid
deploy:debug-fdroid:
<<: *deploy_defaults
only:
<<: *only_changes
refs:
- branches
variables:
- $DEBUG_STORE
dependencies:
- build:debug-signed
script:
- mv pattle.apk "/mnt/fdroid/repo/pattle-$CI_COMMIT_SHORT_SHA.apk"
- docker run --rm -v /mnt/fdroid:/repo registry.gitlab.com/fdroid/docker-executable-fdroidserver:latest update
......@@ -24,14 +24,22 @@ apply plugin: 'kotlin-kapt'
// For the Matrix SDK
apply plugin: 'realm-android'
def ciVersionCode = System.getenv('CI_PIPELINE_IID')
def ciVersionHash = System.getenv('CI_COMMIT_SHORT_SHA')
android {
compileSdkVersion 28
defaultConfig {
applicationId "im.pattle.app"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "0.0.1"
if (ciVersionCode) {
versionCode ciVersionCode as int
versionName "0.0.1-$ciVersionHash"
} else {
versionCode 1
versionName "0.0.1"
}
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment