From 02a619f6a98b6cd483b2e393cb67454a0ac9b458 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Tue, 4 Nov 2025 12:07:59 -0600 Subject: [PATCH 1/2] Add workaround for Android version not being set in CI/CD Tauri 2.9.x has a regression where tauri.properties is not correctly generated from tauri.conf.json during CI/CD builds, causing Android builds to default to version 1.0 (1) instead of reading the configured version and versionCode. This workaround manually generates tauri.properties before the Android build step by reading values directly from tauri.conf.json using jq. The file is in .gitignore (as intended for autogenerated files) and Tauri should be generating it automatically, but 2.9.x broke this functionality. This worked correctly in Tauri 2.8.0. This is a temporary workaround until Tauri fixes the bug upstream. Related issue: https://github.com/tauri-apps/tauri/issues/[TBD] Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- .github/workflows/android-build.yml | 16 ++++++++++++++++ .github/workflows/release.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index df16a5f83..3d8ff19a6 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -126,6 +126,22 @@ jobs: echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties + - name: Generate tauri.properties (Workaround for Tauri 2.9.x bug) + run: | + # Workaround for Tauri 2.9.x not generating tauri.properties correctly + # See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER + VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json) + VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json) + + mkdir -p frontend/src-tauri/gen/android/app + cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF + // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + tauri.android.versionName=$VERSION + tauri.android.versionCode=$VERSION_CODE + EOF + + echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE" + - name: Build Tauri Android App (Signed Release) working-directory: ./frontend run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c134f694c..a9afdf1eb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -222,6 +222,22 @@ jobs: echo "password=$ANDROID_KEY_PASSWORD" >> keystore.properties echo "storeFile=$RUNNER_TEMP/keystore.jks" >> keystore.properties + - name: Generate tauri.properties (Workaround for Tauri 2.9.x bug) + run: | + # Workaround for Tauri 2.9.x not generating tauri.properties correctly + # See: https://github.com/tauri-apps/tauri/issues/YOUR_ISSUE_NUMBER + VERSION=$(jq -r '.version' frontend/src-tauri/tauri.conf.json) + VERSION_CODE=$(jq -r '.bundle.android.versionCode' frontend/src-tauri/tauri.conf.json) + + mkdir -p frontend/src-tauri/gen/android/app + cat > frontend/src-tauri/gen/android/app/tauri.properties << EOF + // THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. + tauri.android.versionName=$VERSION + tauri.android.versionCode=$VERSION_CODE + EOF + + echo "Generated tauri.properties with version $VERSION and versionCode $VERSION_CODE" + - name: Build Tauri Android App (Signed Release) working-directory: ./frontend run: | From 4e251b95e69842e851825306811ea659cac4671a Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Tue, 4 Nov 2025 12:09:26 -0600 Subject: [PATCH 2/2] Bump Android versionCode to 1099005001 Incrementing versionCode for new Android build upload. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- frontend/src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.json index 52d85c1d3..c4dbd7af1 100644 --- a/frontend/src-tauri/tauri.conf.json +++ b/frontend/src-tauri/tauri.conf.json @@ -72,7 +72,7 @@ "developmentTeam": "X773Y823TN" }, "android": { - "versionCode": 1099005000 + "versionCode": 1099005002 }, "windows": { "certificateThumbprint": null,