From f3338e3f0dce647f2f3e0b701dca702eb5299fab Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 26 Aug 2025 14:18:51 -0500 Subject: [PATCH] fix(ci): improve release workflow and proguard setup (#2857) Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- .github/workflows/release.yml | 24 +++++++++++++++----- .github/workflows/reusable-android-build.yml | 8 ------- app/proguard-rules.pro | 6 +---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc2cc9d74..c9f8315d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -161,6 +161,13 @@ jobs: path: app/build/outputs/apk/google/release/app-google-release.apk retention-days: 1 + - name: Upload Mapping File + uses: actions/upload-artifact@v4 + with: + name: mapping + path: app/build/outputs/mapping/googleRelease/mapping.txt + retention-days: 1 + publish-release: runs-on: ubuntu-latest needs: [prepare-build-info, build-fdroid, build-google] @@ -194,11 +201,16 @@ jobs: name: google-apk path: ./build-artifacts/google/apk + - name: Download Mapping File + uses: actions/download-artifact@v5 + with: + name: mapping + path: ./build-artifacts/google/mapping + - name: Generate Changelog id: generate_changelog uses: mikepenz/release-changelog-builder-action@v5 with: - configuration: ".github/changelog-config.json" owner: ${{ github.repository_owner }} repo: ${{ github.event.repository.name }} ignorePreReleases: true @@ -211,8 +223,7 @@ jobs: if: steps.generate_changelog.outputs.changelog != '' run: | mkdir -p play_store_release_notes/en-US - echo "${{ steps.generate_changelog.outputs.changelog }}" > play_store_release_notes/en-US/default.txt - echo "${{ steps.generate_changelog.outputs.changelog }}" > changelog.txt # Also create a root changelog.txt for GitHub release + echo "${{ steps.generate_changelog.outputs.changelog }}" > whatsnew/whatsnew-en-US/default.txt - name: Create version_info.txt run: | @@ -225,7 +236,7 @@ jobs: with: tag_name: ${{ github.ref_name }} name: Release ${{ github.ref_name }} - body: ${{ steps.generate_changelog.outputs.changelog }} + generate_release_notes: true files: | ./build-artifacts/google/bundle/app-google-release.aab ./build-artifacts/google/apk/app-google-release.apk @@ -269,5 +280,6 @@ jobs: packageName: com.geeksville.mesh releaseFiles: ./build-artifacts/google/bundle/app-google-release.aab track: ${{ steps.get_track.outputs.track }} - status: 'draft' - whatsNewDirectory: ./play_store_release_notes/en-US/ + status: ${{ steps.get_track.outputs.track == 'internal' && 'complete' || 'draft' }} + whatsNewDirectory: /whatsnew/ + mappingFile: ./build-artifacts/google/mapping/mapping.txt diff --git a/.github/workflows/reusable-android-build.yml b/.github/workflows/reusable-android-build.yml index c296dc996..d6077542e 100644 --- a/.github/workflows/reusable-android-build.yml +++ b/.github/workflows/reusable-android-build.yml @@ -85,14 +85,6 @@ jobs: path: app/build/outputs/apk/google/debug/app-google-debug.apk retention-days: 14 - - name: Attest Build Provenance - if: ${{ inputs.upload_artifacts && github.ref_name == 'main' && github.repository == 'meshtastic/Meshtastic-Android' }} - uses: actions/attest-build-provenance@v2 - with: - subject-path: | - app/build/outputs/apk/google/debug/app-google-debug.apk - app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk - - name: Upload reports if: ${{ inputs.upload_artifacts }} uses: actions/upload-artifact@v4 diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 165eeb2da..d5d90b071 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -14,7 +14,7 @@ # Uncomment this to preserve the line number information for # debugging stack traces. -#-keepattributes SourceFile,LineNumberTable +-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. @@ -27,9 +27,6 @@ # eclipse.paho.client -keep class org.eclipse.paho.client.mqttv3.logging.JSR47Logger { *; } -# ormlite --dontwarn com.j256.ormlite.** - # OkHttp -dontwarn okhttp3.internal.platform.** -dontwarn org.conscrypt.** @@ -37,7 +34,6 @@ -dontwarn org.openjsse.** # ? --dontwarn java.awt.image.** -dontwarn java.lang.reflect.** -dontwarn com.google.errorprone.annotations.**