From bf35afbdf5143d811a9f3df927ec0439e1f1f714 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Fri, 2 Oct 2026 15:10:33 +0200 Subject: [PATCH] CI: APK only on app changes, Gradle cached Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/release-apk.yml | 10 ++++++++++ app/pubspec.yaml | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-apk.yml b/.github/workflows/release-apk.yml index 5fad7c2..4a736f5 100644 --- a/.github/workflows/release-apk.yml +++ b/.github/workflows/release-apk.yml @@ -3,6 +3,14 @@ name: release-apk on: push: branches: [main] + # A publisher, not a gate: build only when something that ends up in + # the APK changed. versionCode is the commit count, so skipped pushes + # still leave it monotonic. + paths: + - 'app/**' + - '.fvmrc' + - '.versioncode-offset' + - '.github/workflows/release-apk.yml' # Lets a release be rebuilt from the current main without a dummy commit. workflow_dispatch: @@ -47,6 +55,8 @@ jobs: with: distribution: temurin java-version: "17" + # ~/.gradle caches + wrapper, keyed on the Gradle files. + cache: gradle - uses: subosito/flutter-action@v2 with: diff --git a/app/pubspec.yaml b/app/pubspec.yaml index 9bf8293..5aa3d2c 100644 --- a/app/pubspec.yaml +++ b/app/pubspec.yaml @@ -2,7 +2,7 @@ name: diet_guard_app description: "Companion phone app for diet_guard: log meals on the go." publish_to: 'none' -version: 1.0.98+1 +version: 1.0.99+1 environment: sdk: ^3.12.2