chore: fix apk signing

This commit is contained in:
2026-05-23 13:45:23 +07:00
parent 5c7027e559
commit f1f603525b
2 changed files with 16 additions and 13 deletions

View File

@@ -23,8 +23,18 @@ jobs:
- name: Grant execute permission for 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
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
uses: akkuman/gitea-release-action@v1

View File

@@ -1,5 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import java.util.Properties
plugins {
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 {
namespace = "su.reya.coop"
compileSdk = libs.versions.android.compileSdk.get().toInt()
@@ -63,10 +55,11 @@ android {
signingConfigs {
create("release") {
storeFile = localProperties.getProperty("keystore.path")?.let { file(it) }
storePassword = localProperties.getProperty("keystore.password")
keyAlias = localProperties.getProperty("key.alias")
keyPassword = localProperties.getProperty("key.password")
val path = System.getenv("KEYSTORE_PATH")
storeFile = path?.let { file(it) }
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("KEY_ALIAS")
keyPassword = System.getenv("KEY_PASSWORD")
}
}
defaultConfig {