diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 30701af..cea7ccb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,7 @@ concurrency: env: key_name: parking-release package_name: org.cssnr.parking + acra_id: 4 jobs: release: @@ -32,6 +33,11 @@ jobs: key_file: release.keystore gradle_file: app/build.gradle.kts signed_apk: app-release.apk + # Optional Step Variables + secret_properties: secret.properties + google_services: # app/google-services.json + play_store_channel: # internal + run_prepare: # yes steps: - name: "Checkout" @@ -85,42 +91,47 @@ jobs: cat ${{ env.gradle_file }} echo "::endgroup::" - #- name: "Write Google Services File" - # run: | - # echo "${{ secrets.GOOGLE_SERVICES }}" | base64 --decode > app/google-services.json - # stat app/google-services.json + - name: "Write Google Services File" + if: ${{ env.google_services }} + run: | + echo "${{ secrets.GOOGLE_SERVICES }}" | base64 --decode > ${{ env.google_services }} + wc -l ${{ env.google_services }} - name: "Write Secret Properties" + if: ${{ env.secret_properties }} run: | - echo "${{ secrets.SECRET_PROPERTIES }}" | base64 --decode > secret.properties - wc -l secret.properties + echo "${{ secrets.SECRET_PROPERTIES }}" | base64 --decode > ${{ env.secret_properties }} + wc -l ${{ env.secret_properties }} - name: "Write Keystore File" run: | echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > ${{ env.key_file }} echo "${{ secrets.ANDROID_KEYSTORE_PASS }}" | keytool -list -keystore ${{ env.key_file }} - #- name: "Setup Node 24" - # uses: actions/setup-node@v7 - # with: - # node-version: 24 - # - #- name: "Prepare Build" - # working-directory: ".github/scripts" - # run: | - # bash prepare.sh - # - #- name: "Debug Prepare" - # continue-on-error: true - # run: | - # ls . - # ls -lAh app + - name: "Setup Node 24" + if: ${{ env.run_prepare }} + uses: actions/setup-node@v7 + with: + node-version: 24 + + - name: "Prepare Build" + if: ${{ env.run_prepare }} + working-directory: ".github/scripts" + run: | + bash prepare.sh + + - name: "Debug Prepare" + if: ${{ env.run_prepare }} + continue-on-error: true + run: | + ls . + ls -lAh app - name: "Setup Java" uses: actions/setup-java@v6 with: distribution: "zulu" - java-version: "17" + java-version: "21" #cache: "gradle" - name: "Gradle Assemble APK" @@ -160,6 +171,16 @@ jobs: name: mapping path: ${{ env.mapping_file }} + - name: "Create Version in Acrarium" + if: ${{ env.acra_id }} + continue-on-error: true + run: | + echo -n "See GitHub Actions" | curl -m 120 \ + -H "Content-Type: text/plain" \ + -u "${{ secrets.ACRARIUM_USER }}:${{ secrets.ACRARIUM_PASS }}" \ + --data-binary @- \ + "${{ secrets.ACRARIUM_HOST }}/api/apps/${{ env.acra_id }}/version/upload/${{ github.run_number }}?name=${{ github.ref_name }}" + - name: "Upload APK to Artifacts" uses: actions/upload-artifact@v7 with: @@ -173,69 +194,69 @@ jobs: files: ${{ env.apk_path }}/${{ env.signed_apk }} overwrite: true - #- name: "Gradle Bundle AAB" - # if: ${{ !github.event.release.prerelease }} - # run: | - # chmod +x ./gradlew - # ./gradlew bundleRelease - # - #- name: "Debug Bundle" - # if: ${{ !github.event.release.prerelease }} - # continue-on-error: true - # run: | - # echo "env.aab_path: ${{ env.aab_path }}" - # ls -lAh "${{ env.aab_path }}" ||: - # echo "env.debug_symbols: ${{ env.debug_symbols }}" - # ls -lAh "${{ env.debug_symbols }}" ||: - # echo "env.mapping_file: ${{ env.mapping_file }}" - # ls -lAh "$(dirname "${{ env.debug_symbols }}")" ||: - # - #- name: "Sign Bundle" - # if: ${{ !github.event.release.prerelease }} - # run: | - # apksigner sign --ks ${{ env.key_file }} \ - # --min-sdk-version 26 \ - # --v1-signing-enabled true \ - # --v2-signing-enabled true \ - # --ks-pass pass:${{ secrets.ANDROID_KEYSTORE_PASS }} \ - # --ks-key-alias ${{ env.key_name }} \ - # "${{ env.aab_path }}/${{ env.aab_file }}" - # - #- name: "Upload Bundle to Artifacts" - # if: ${{ !github.event.release.prerelease }} - # uses: actions/upload-artifact@v7 - # with: - # name: bundle - # path: ${{ env.aab_path }} - # - #- name: "Parse Release Notes" - # if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - # id: notes - # run: | - # body="${{ github.event.release.body }}" - # summary="$(echo "${body%%#*}" | tr -d '\r' | sed ':a;N;$!ba;s/\n*$//')" - # echo "summary<> "$GITHUB_OUTPUT" - # echo "$summary" >> "$GITHUB_OUTPUT" - # echo "EOF" >> "$GITHUB_OUTPUT" - # - #- name: "Generate Whats New" - # if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - # run: | - # mkdir -p whatsNew - # echo -n "${{ steps.notes.outputs.summary }}" > whatsNew/whatsnew-en-US - # - #- name: "Upload Google Play" - # if: ${{ github.event_name == 'release' && !github.event.release.prerelease }} - # uses: r0adkll/upload-google-play@v1 - # with: - # serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }} - # packageName: ${{ env.package_name }} - # releaseFiles: ${{ env.aab_path }}/${{ env.aab_file }} - # debugSymbols: ${{ env.debug_symbols }} - # mappingFile: ${{ env.mapping_file }} - # whatsNewDirectory: whatsNew - # releaseName: "${{ github.run_number }} (${{ github.ref_name }})" - # tracks: internal + - name: "Gradle Bundle AAB" + if: ${{ env.play_store_channel && !github.event.release.prerelease }} + run: | + chmod +x ./gradlew + ./gradlew bundleRelease + + - name: "Debug Bundle" + if: ${{ env.play_store_channel && !github.event.release.prerelease }} + continue-on-error: true + run: | + echo "env.aab_path: ${{ env.aab_path }}" + ls -lAh "${{ env.aab_path }}" ||: + echo "env.debug_symbols: ${{ env.debug_symbols }}" + ls -lAh "${{ env.debug_symbols }}" ||: + echo "env.mapping_file: ${{ env.mapping_file }}" + ls -lAh "$(dirname "${{ env.debug_symbols }}")" ||: + + - name: "Sign Bundle" + if: ${{ env.play_store_channel && !github.event.release.prerelease }} + run: | + apksigner sign --ks ${{ env.key_file }} \ + --min-sdk-version 26 \ + --v1-signing-enabled true \ + --v2-signing-enabled true \ + --ks-pass pass:${{ secrets.ANDROID_KEYSTORE_PASS }} \ + --ks-key-alias ${{ env.key_name }} \ + "${{ env.aab_path }}/${{ env.aab_file }}" + + - name: "Upload Bundle to Artifacts" + if: ${{ env.play_store_channel && !github.event.release.prerelease }} + uses: actions/upload-artifact@v7 + with: + name: bundle + path: ${{ env.aab_path }} + + - name: "Parse Release Notes" + if: ${{ env.play_store_channel && github.event_name == 'release' && !github.event.release.prerelease }} + id: notes + run: | + body="${{ github.event.release.body }}" + summary="$(echo "${body%%#*}" | tr -d '\r' | sed ':a;N;$!ba;s/\n*$//')" + echo "summary<> "$GITHUB_OUTPUT" + echo "$summary" >> "$GITHUB_OUTPUT" + echo "EOF" >> "$GITHUB_OUTPUT" + + - name: "Generate Whats New" + if: ${{ env.play_store_channel && github.event_name == 'release' && !github.event.release.prerelease }} + run: | + mkdir -p whatsNew + echo -n "${{ steps.notes.outputs.summary }}" > whatsNew/whatsnew-en-US + + - name: "Upload Google Play" + if: ${{ env.play_store_channel && github.event_name == 'release' && !github.event.release.prerelease }} + uses: r0adkll/upload-google-play@v1 + with: + serviceAccountJsonPlainText: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_JSON }} + packageName: ${{ env.package_name }} + releaseFiles: ${{ env.aab_path }}/${{ env.aab_file }} + debugSymbols: ${{ env.debug_symbols }} + mappingFile: ${{ env.mapping_file }} + whatsNewDirectory: whatsNew + releaseName: "${{ github.run_number }} (${{ github.ref_name }})" + tracks: ${{ env.play_store_channel }} - name: "Update Release Notes Action" if: ${{ github.event_name == 'release' }} diff --git a/README.md b/README.md index 6e2be63..82bbebf 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ Parking Android application, built with Kotlin, Jetpack Compose and Material 3. Automatically detect **where** you parked your car... > [!WARNING] -> This app is currently in **beta** testing. -> Expect bugs and/or breaking changes along the way... +> Upgrading to `0.0.7` requires re-installing the application. +> A new certificated was generated due to an incorrect CN. > Please report any [Issues](https://github.com/cssnr/parking-android/issues) you find. ## Install @@ -87,7 +87,7 @@ should take you to the settings area to allow installation if not already enable _The GitHub APK has been registered with Google's [Android developer verification](https://developer.android.com/developer-verification)._ ``` -EB:3C:65:A6:C9:63:4A:27:07:C2:0F:AC:C7:0E:A5:CD:2A:73:93:40:D9:5D:78:3B:21:7A:34:C6:87:AF:01:92 +10:A4:FC:C1:B6:B7:1C:AD:F9:D1:D6:E2:EE:1E:A0:CC:37:2F:25:33:F9:B7:A2:77:2D:DA:DD:08:14:EC:0C:03 ``` [_How to Verify an APK Signature_](https://developer.android.com/tools/apksigner#usage-verify) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 13cc927..6901311 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,8 +18,8 @@ kotlin = "2.4.20" composeBom = "2026.09.00" materialIcons = "1.7.8" composeUiTest = "1.12.1" -acra = "5.13.1" -maplibre = "0.18.0" +acra = "5.14.2" +maplibre = "0.19.0" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }