Setup nighlty build + GitHub action
This commit is contained in:
parent
a495da31fa
commit
db1cdbfbd4
|
@ -0,0 +1,25 @@
|
|||
name: Build and release nightly APK
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Every nights at 4
|
||||
- cron: "0 4 * * *"
|
||||
|
||||
env:
|
||||
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
|
||||
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
|
||||
|
||||
jobs:
|
||||
nightly:
|
||||
name: Build and publish nightly APK to Firebase
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build and upload Nightly APK
|
||||
run: |
|
||||
./gradlew assembleNightly appDistributionUploadNightly $CI_GRADLE_ARG_PROPERTIES
|
||||
env:
|
||||
ELEMENT_ANDROID_NIGHTLY_KEYID: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYID }}
|
||||
ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD }}
|
||||
ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD }}
|
||||
FIREBASE_TOKEN: ${{ secrets.ELEMENT_ANDROID_NIGHTLY_FIREBASE_TOKEN }}
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'com.google.devtools.ksp' version '1.7.20-1.0.7'
|
||||
id 'com.google.firebase.appdistribution' version '3.0.2'
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -20,6 +21,21 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
storeFile file('./signature/debug.keystore')
|
||||
storePassword 'android'
|
||||
}
|
||||
nightly {
|
||||
keyAlias System.env.ELEMENT_ANDROID_NIGHTLY_KEYID ?: project.property("signing.element.nightly.keyId")
|
||||
keyPassword System.env.ELEMENT_ANDROID_NIGHTLY_KEYPASSWORD ?: project.property("signing.element.nightly.keyPassword")
|
||||
storeFile file('./signature/nightly.keystore')
|
||||
storePassword System.env.ELEMENT_ANDROID_NIGHTLY_STOREPASSWORD ?: project.property("signing.element.nightly.storePassword")
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
resValue "string", "app_name", "ElementX dbg"
|
||||
|
@ -33,6 +49,24 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
nightly {
|
||||
initWith release
|
||||
applicationIdSuffix ".nightly"
|
||||
versionNameSuffix "-nightly"
|
||||
resValue "string", "app_name", "ElementX nightly"
|
||||
matchingFallbacks = ['release']
|
||||
signingConfig signingConfigs.nightly
|
||||
firebaseAppDistribution {
|
||||
artifactType = "APK"
|
||||
// releaseNotesFile = TODO
|
||||
groups = "external-testers"
|
||||
// This should not be required, but if I do not add the appId, I get this error:
|
||||
// "App Distribution halted because it had a problem uploading the APK: [404] Requested entity was not found."
|
||||
appId = "1:912726360885:android:e17435e0beb0303000427c"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
|
@ -60,15 +94,6 @@ android {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
debug {
|
||||
keyAlias 'androiddebugkey'
|
||||
keyPassword 'android'
|
||||
storeFile file('./signature/debug.keystore')
|
||||
storePassword 'android'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
Binary file not shown.
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"project_info": {
|
||||
"project_number": "912726360885",
|
||||
"firebase_url": "https://vector-alpha.firebaseio.com",
|
||||
"project_id": "vector-alpha",
|
||||
"storage_bucket": "vector-alpha.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:912726360885:android:e17435e0beb0303000427c",
|
||||
"android_client_info": {
|
||||
"package_name": "io.element.android.x.nightly"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "912726360885-e87n3jva9uoj4vbidvijq78ebg02asv2.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyAFZX8IhIfgzdOZvxDP_ISO5WYoU7jmQ5c"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "912726360885-e87n3jva9uoj4vbidvijq78ebg02asv2.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
|
@ -20,4 +20,9 @@ kotlin.code.style=official
|
|||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonTransitiveRClass=true
|
||||
|
||||
# Dummy values for signing secrets / nightly
|
||||
signing.element.nightly.storePassword=Secret
|
||||
signing.element.nightly.keyId=Secret
|
||||
signing.element.nightly.keyPassword=Secret
|
|
@ -1,6 +1,7 @@
|
|||
[versions]
|
||||
# Project
|
||||
android_gradle_plugin = "7.3.1"
|
||||
firebase_gradle_plugin = "3.0.2"
|
||||
kotlin = "1.7.20"
|
||||
|
||||
# AndroidX
|
||||
|
@ -41,6 +42,7 @@ serialization-json = "1.4.1"
|
|||
[libraries]
|
||||
# Project
|
||||
android_gradle_plugin = { module = "com.android.tools.build:gradle", version.ref = "android_gradle_plugin" }
|
||||
firebase_gradle_plugin = { module = "com.google.firebase:firebase-appdistribution-gradle", version.ref = "firebase_gradle_plugin" }
|
||||
kotlin_gradle_plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
|
||||
|
||||
# AndroidX
|
||||
|
|
|
@ -11,4 +11,5 @@ repositories {
|
|||
dependencies {
|
||||
implementation(libs.android.gradle.plugin)
|
||||
implementation(libs.kotlin.gradle.plugin)
|
||||
implementation(libs.firebase.gradle.plugin)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue