Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/android_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ jobs:
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }} # base64로 암호화된 json 사용
run: echo $FIREBASE_SECRET | base64 --decode > app/google-services.json

# keystore 복호화
- name: Decode keystore file
env:
STORE_FILE_BASE: ${{ secrets.STORE_FILE }}
run: |
mkdir -p keystore
echo "$STORE_FILE" | base64 --decode > keystore/clody_release.jks

Comment on lines +66 to +73
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

⚠️ Potential issue

Variable Mismatch in Keystore Decoding Step
The keystore decoding step defines an environment variable STORE_FILE_BASE (line 69) but uses $STORE_FILE (line 72) when decoding the keystore file. This mismatch may result in an empty or incorrect keystore file during the build process. Please update the variable reference to ensure consistency.

-                  echo "$STORE_FILE" | base64 --decode > keystore/clody_release.jks
+                  echo "$STORE_FILE_BASE" | base64 --decode > keystore/clody_release.jks
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# keystore 복호화
- name: Decode keystore file
env:
STORE_FILE_BASE: ${{ secrets.STORE_FILE }}
run: |
mkdir -p keystore
echo "$STORE_FILE" | base64 --decode > keystore/clody_release.jks
# keystore 복호화
- name: Decode keystore file
env:
STORE_FILE_BASE: ${{ secrets.STORE_FILE }}
run: |
mkdir -p keystore
echo "$STORE_FILE_BASE" | base64 --decode > keystore/clody_release.jks

# local.properties 생성
- name: Generate local.properties
env:
Expand All @@ -71,13 +79,19 @@ jobs:
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
GOOGLE_ADMOB_APP_ID: ${{ secrets.GOOGLE_ADMOB_APP_ID }}
GOOGLE_ADMOB_UNIT_ID: ${{ secrets.GOOGLE_ADMOB_UNIT_ID }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: |
echo "baseUrl=$BASE_URL" >> local.properties
echo "kakao.api.key=$KAKAO_API_KEY" >> local.properties
echo "amplitude.api.key=$AMPLITUDE_API_KEY" >> local.properties
echo "googleAdmob.app.id=$GOOGLE_ADMOB_APP_ID" >> local.properties
echo "googleAdmob.unit.id=$GOOGLE_ADMOB_UNIT_ID" >> local.properties

echo "storeFile=keystore/clody_release.jks" >> local.properties
echo "storePassword=$STORE_PASSWORD" >> local.properties
echo "keyAlias=$KEY_ALIAS" >> local.properties
echo "keyPassword=$KEY_PASSWORD" >> local.properties

# ------- Build & Lint -------
- name: Run Lint and Build
Expand Down
15 changes: 12 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
applicationId = "com.sopt.clody"
minSdk = 28
targetSdk = 35
versionCode = 18
versionName = "1.0.7"
versionCode = 23
versionName = "1.1.0"
val kakaoApiKey: String = properties.getProperty("kakao.api.key")
val amplitudeApiKey: String = properties.getProperty("amplitude.api.key")
val googleAdmobAppId: String = properties.getProperty("GOOGLE_ADMOB_APP_ID", "")
Expand All @@ -40,6 +40,15 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
create("release") {
storeFile = file(properties.getProperty("storeFile") ?: "")
storePassword = properties.getProperty("storePassword") ?: ""
keyAlias = properties.getProperty("keyAlias") ?: ""
keyPassword = properties.getProperty("keyPassword") ?: ""
}
}

buildTypes {
debug {
isMinifyEnabled = false
Expand All @@ -54,7 +63,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("debug")
signingConfig = signingConfigs.getByName("release")
}
}
compileOptions {
Expand Down