chore: fix apk signing
This commit is contained in:
10
.github/workflows/android.yml
vendored
10
.github/workflows/android.yml
vendored
@@ -23,8 +23,18 @@ jobs:
|
|||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
||||||
|
- name: Decode Keystore
|
||||||
|
run: |
|
||||||
|
# Decodes the Base64 string from secrets to a physical file
|
||||||
|
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > composeApp/release.jks
|
||||||
|
|
||||||
- name: Build APK
|
- name: Build APK
|
||||||
run: ./gradlew :composeApp:assembleRelease
|
run: ./gradlew :composeApp:assembleRelease
|
||||||
|
env:
|
||||||
|
KEYSTORE_PATH: release.jks
|
||||||
|
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||||
|
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||||
|
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||||
|
|
||||||
- name: Gitea Release
|
- name: Gitea Release
|
||||||
uses: akkuman/gitea-release-action@v1
|
uses: akkuman/gitea-release-action@v1
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
import java.util.Properties
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.kotlinMultiplatform)
|
alias(libs.plugins.kotlinMultiplatform)
|
||||||
@@ -48,13 +47,6 @@ kotlin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val localProperties = Properties().apply {
|
|
||||||
val file = rootProject.file("local.properties")
|
|
||||||
if (file.exists()) {
|
|
||||||
load(file.inputStream())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "su.reya.coop"
|
namespace = "su.reya.coop"
|
||||||
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
compileSdk = libs.versions.android.compileSdk.get().toInt()
|
||||||
@@ -63,10 +55,11 @@ android {
|
|||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
create("release") {
|
create("release") {
|
||||||
storeFile = localProperties.getProperty("keystore.path")?.let { file(it) }
|
val path = System.getenv("KEYSTORE_PATH")
|
||||||
storePassword = localProperties.getProperty("keystore.password")
|
storeFile = path?.let { file(it) }
|
||||||
keyAlias = localProperties.getProperty("key.alias")
|
storePassword = System.getenv("KEYSTORE_PASSWORD")
|
||||||
keyPassword = localProperties.getProperty("key.password")
|
keyAlias = System.getenv("KEY_ALIAS")
|
||||||
|
keyPassword = System.getenv("KEY_PASSWORD")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|||||||
Reference in New Issue
Block a user