Skip to content

Commit

Permalink
add release build with signing
Browse files Browse the repository at this point in the history
  • Loading branch information
iakanoe committed Nov 3, 2023
1 parent da4d0f3 commit 54b49df
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build Release App Bundle

on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: make gradlew executable
run: chmod +x ./gradlew
- name: add api key property
run: echo "API_KEY=\"${{ secrets.DOLARITO_API_KEY }}\"" >> local.properties
- name: build prod
run: ./gradlew app:bundleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: upload to github
uses: actions/upload-artifact@v3
with:
name: Build Artifacts
path: app/build/outputs/
12 changes: 11 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ android {
buildConfigField("String", "API_KEY", gradleLocalProperties(rootDir).getProperty("API_KEY"))
}

signingConfigs {
create("release") {
storeFile = rootDir.resolve("keystore/dolarcito_release.jks")
storePassword = System.getenv("SIGNING_STORE_PASSWORD")
keyAlias = System.getenv("SIGNING_KEY_ALIAS")
keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
}
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
signingConfig = signingConfigs["release"]
}
}

Expand Down Expand Up @@ -75,7 +85,7 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
implementation("androidx.activity:activity-compose:1.8.0")
implementation("androidx.navigation:navigation-compose:2.7.4")
implementation("androidx.navigation:navigation-compose:2.7.5")
implementation("androidx.datastore:datastore-preferences:1.0.0")

implementation(platform("androidx.compose:compose-bom:2023.10.01"))
Expand Down
Binary file added keystore/dolarcito_release.jks
Binary file not shown.

0 comments on commit 54b49df

Please sign in to comment.