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: | 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,