From 27f812cac03e840b5b3bc8240a9e57d98cd4eccd Mon Sep 17 00:00:00 2001 From: Acocalypso Date: Thu, 5 Oct 2023 23:55:59 +0200 Subject: [PATCH] fix yml --- .github/workflows/android-ci.yml | 17 ++++++++++------- app/build.gradle.kts | 16 ++++++++-------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index ffcf6d2..53f4253 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -68,18 +68,21 @@ jobs: run: echo $KEYSTORE_FILE | base64 -d > /home/runner/work/reactmap-android/reactmap-android/keystore.jks - name: Build apk release project (APK) - ${{ env.main_project_module }} module - run: ./gradlew assembleRelease - -PKEYSTORE_FILE="/home/runner/work/reactmap-android/reactmap-android/keystore.jks" - -PKEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }} - -PSIGNING_KEY_ALIAS=${{ secrets.KEY_ALIAS }} - -PSIGNING_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }} + run: ./gradlew assembleRelease -x test + env: + SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + SIGNING_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} + # -PKEYSTORE_FILE="/home/runner/work/reactmap-android/reactmap-android/keystore.jks" + # -PKEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }} + # -PSIGNING_KEY_ALIAS=${{ secrets.KEY_ALIAS }} + # -PSIGNING_KEY_PASSWORD=${{ secrets.KEY_PASSWORD }} - name: Upload Artifact uses: actions/upload-artifact@v3 with: name: Reactmap-android - #path: ${{ env.main_project_module }}/build/outputs/apk/release/ - path: ${{ env.main_project_module }}/release/ + path: ${{ env.main_project_module }}/build/outputs/apk/release/ release: name: Release APK needs: build diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 45ac927..88f77a7 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -32,26 +32,26 @@ android { } else "null") } - /*signingConfigs { + signingConfigs { create("release") { - storeFile = file(project.property("KEYSTORE_FILE").toString()) - storePassword = project.property("KEYSTORE_PASSWORD").toString() - keyAlias = project.property("SIGNING_KEY_ALIAS").toString() - keyPassword = project.property("SIGNING_KEY_PASSWORD").toString() + storeFile = file("../keystore.jks") + storePassword = System.getenv("KEYSTORE_PASSWORD") + keyAlias = System.getenv("SIGNING_KEY_ALIAS") + keyPassword = System.getenv("SIGNING_KEY_PASSWORD") } - }*/ + } buildTypes { debug { isPseudoLocalesEnabled = true } - release { + getByName("release") { isMinifyEnabled = true proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") if (!pluginManager.hasPlugin("com.google.gms.google-services")) { the().mappingFileUploadEnabled = false } - // signingConfig = signingConfigs.getByName(name) + signingConfig = signingConfigs.getByName("release") } } buildFeatures.buildConfig = true