Skip to content

Commit

Permalink
add write politerai_release.keystore file to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Turskyi committed Dec 7, 2023
1 parent e89fb6d commit c01cee8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/compose_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ jobs:
env:
CODEMAGIC_KEYSTORE: ${{ secrets.CODEMAGIC_KEYSTORE }}

- name: Write politerai_release.keystore file
run: |
echo $RELEASE_KEYSTORE | base64 -d > composeApp/src/androidMain/keystore/politerai_release.keystore
shell: bash
env:
CODEMAGIC_KEYSTORE: ${{ secrets.RELEASE_KEYSTORE }}

- name: Generate Release APK
run: ./gradlew assembleDebug

Expand All @@ -43,5 +50,5 @@ jobs:
token: ${{secrets.FIREBASE_TOKEN}}
groups: testers
releaseNotes: "Politer AI Android Application Build"
file: composeApp/build/outputs/apk/debug/composeApp-debug.apk
file: composeApp/build/outputs/apk/release/composeApp-release.apk

7 changes: 6 additions & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ android {
buildTypes {
getByName("release") {
isMinifyEnabled = false
signingConfig = signingConfigs.getByName("release")
signingConfig =
if (System.getenv()["CI"] == "true") { // CI=true is exported by Codemagic
signingConfigs.getByName("release")
} else {
signingConfigs.getByName("production")
}
}
getByName("debug") {
signingConfig = signingConfigs.getByName("dev")
Expand Down

0 comments on commit c01cee8

Please sign in to comment.