Skip to content

Commit

Permalink
Merge pull request #268 from mikepenz/feature/rework_sample_signing
Browse files Browse the repository at this point in the history
Improve release signing logic
  • Loading branch information
mikepenz authored Jan 5, 2025
2 parents 23d81c2 + 5208498 commit 3fa2699
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 23 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,10 @@ jobs:
run: |
echo "${{ secrets.KEYSTORE }}" > opensource.jks.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch "opensource.jks.asc" > "app/opensource.jks"
echo "${{ secrets.SIGNING_GRADLE }}" > signing.gradle.asc
gpg -d --passphrase "${{ secrets.KEYSTORE_PASSPHRASE }}" --batch "signing.gradle.asc" > "app/signing.gradle"
echo "openSource.signing.file=signing.gradle" >> local.properties
- name: Build Release App
if: startsWith(github.ref, 'refs/tags/')
run: ./gradlew app:assembleRelease app:bundleRelease
run: ./gradlew app:assembleRelease app:bundleRelease -P"com.mikepenz.android.signing.enabled"="true" -P"com.mikepenz.android.signing.storeFile"="app/opensource.jks" -P"com.mikepenz.android.signing.storePassword"="${{ secrets.STORE_PASSWORD }}" -P"com.mikepenz.android.signing.keyAlias"="${{ secrets.KEY_ALIAS }}" -P"com.mikepenz.android.signing.keyPassword"="${{ secrets.KEY_PASSWORD }}"

- name: Collect artifacts
if: startsWith(github.ref, 'refs/tags/')
Expand Down
19 changes: 1 addition & 18 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.konan.properties.Properties

plugins {
id("com.mikepenz.convention.kotlin")
id("com.mikepenz.convention.android-application")
Expand All @@ -8,10 +6,6 @@ plugins {
alias(baseLibs.plugins.screenshot)
}

if (openSourceSigningFile != null) {
apply(from = openSourceSigningFile)
}

android {
namespace = "com.mikepenz.markdown.app"

Expand Down Expand Up @@ -44,15 +38,4 @@ dependencies {
aboutLibraries {
registerAndroidTasks = false
duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.MERGE
}

private val openSourceSigningFile: String?
get() {
val k = "openSource.signing.file"
return Properties().also { prop ->
rootProject.file("local.properties").takeIf { it.exists() }?.let {
prop.load(it.inputStream())
}
}.getProperty(k, null) ?: if (project.hasProperty(k)) project.property(k)
?.toString() else null
}
}
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
conventionPlugin = "0.1.0"
conventionPlugin = "0.1.3"
androidx-activityCompose = "1.9.3"
androidx-material = "1.12.0"
coil = "3.0.4"
Expand Down

0 comments on commit 3fa2699

Please sign in to comment.