Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] release key 설정 #295

Closed
wants to merge 4 commits into from
Closed
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
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,24 @@ jobs:
mkdir -p $HOME/.android
echo "$DEBUG_KEYSTORE_BASE64" | base64 -d > $HOME/.android/debug.keystore

- name: Decode Release Keystore
env:
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
run: |
mkdir -p ./keystore
echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > ./keystore/release.jks

- name: Configure Keystore Properties
run: |
echo "RELEASE_KEYSTORE_PATH=./keystore/release.jks" >> local.properties
echo "RELEASE_KEYSTORE_PASSWORD=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" >> local.properties
echo "RELEASE_KEY_ALIAS=${{ secrets.RELEASE_KEY_ALIAS }}" >> local.properties
echo "RELEASE_KEY_PASSWORD=${{ secrets.RELEASE_KEY_PASSWORD }}" >> local.properties

- name: Debug Local Properties
run: |
cat local.properties
ls -la ./keystore

- name: Run Build
run: ./gradlew build --no-daemon
19 changes: 19 additions & 0 deletions .github/workflows/ktlin_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,24 @@ jobs:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: echo "$GOOGLE_SERVICES_JSON" > ./app/google-services.json

- name: Decode Release Keystore
env:
RELEASE_KEYSTORE_BASE64: ${{ secrets.RELEASE_KEYSTORE_BASE64 }}
run: |
mkdir -p ./keystore
echo "$RELEASE_KEYSTORE_BASE64" | base64 -d > ./keystore/release.jks

- name: Configure Keystore Properties
run: |
echo "RELEASE_KEYSTORE_PATH=./keystore/release.jks" >> local.properties
echo "RELEASE_KEYSTORE_PASSWORD=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" >> local.properties
echo "RELEASE_KEY_ALIAS=${{ secrets.RELEASE_KEY_ALIAS }}" >> local.properties
echo "RELEASE_KEY_PASSWORD=${{ secrets.RELEASE_KEY_PASSWORD }}" >> local.properties

- name: Debug Local Properties
run: |
cat local.properties
ls -la ./keystore

- name: Run ktlintCheck
run: ./gradlew ktlintCheck --no-daemon
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ local.properties
.idea/
.kotlin/
*.keystore
*.jks
/app/release
19 changes: 19 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ android {
file("${System.getProperty("user.home")}/.android/debug.keystore")
}
}

create("release") {
val keystoreProperties = Properties().apply {
val file = rootProject.file("local.properties")
if (file.exists()) {
load(file.inputStream())
}
}
val keyStorePath = keystoreProperties.getProperty("RELEASE_KEYSTORE_PATH")
val storePasswordValue = keystoreProperties.getProperty("RELEASE_KEYSTORE_PASSWORD")
val keyAliasValue = keystoreProperties.getProperty("RELEASE_KEY_ALIAS")
val keyPasswordValue = keystoreProperties.getProperty("RELEASE_KEY_PASSWORD")

storeFile = file(keyStorePath)
storePassword = storePasswordValue
keyAlias = keyAliasValue
keyPassword = keyPasswordValue
}
}
namespace = "com.boostcamp.dreamteam.dreamdiary"

Expand All @@ -37,6 +55,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
signingConfig = signingConfigs.getByName("release")
}
}
buildFeatures {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<resources>
<string name="app_name">dreamdiary</string>
<string name="app_name">DreamDiary</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class AndroidApplicationConventionPlugin : Plugin<Project> {
minSdk = 24
targetSdk = 35

versionCode = 2
versionName = "0.0.2"
versionCode = 3
versionName = "0.0.3"
}

configureKotlinAndroid(this)
Expand Down
Loading