diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..288ef4a --- /dev/null +++ b/.github/workflows/build-release.yml @@ -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/ \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 52dea02..22a84f9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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"] } } @@ -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")) diff --git a/keystore/dolarcito_release.jks b/keystore/dolarcito_release.jks new file mode 100644 index 0000000..b91cd21 Binary files /dev/null and b/keystore/dolarcito_release.jks differ