Split Gradle build cache into restore/save steps so hits still refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 01:32:11 +03:00
Unverified
parent a13be70262
commit 08e8a9c4eb
3 changed files with 47 additions and 24 deletions
+20 -12
View File
@@ -85,10 +85,13 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: "true"
id: gradle-build-cache
- name: Compile and ProGuard release desktop jars
run: ./gradlew :app:desktop:exportReleaseProguardForCi --no-daemon --console=plain
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
- uses: actions/upload-artifact@v5
with:
name: desktop-proguard
@@ -108,8 +111,7 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: "true"
id: gradle-build-cache
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
@@ -134,6 +136,10 @@ jobs:
path: app/desktop/windows-setup/target/release/*.exe
if-no-files-found: error
retention-days: 3
- uses: ./.github/actions/save-gradle-build-cache
if: always()
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
windows-package:
name: Windows (${{ matrix.label }})
@@ -169,8 +175,6 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: "false"
- uses: actions/download-artifact@v5
with:
name: desktop-proguard
@@ -229,8 +233,7 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: ${{ matrix.arch == 'arm64' }}
id: gradle-build-cache
- uses: actions/download-artifact@v5
with:
name: desktop-proguard
@@ -262,6 +265,10 @@ jobs:
name: macos-${{ matrix.arch }}
path: app/desktop/build/distributions/release/*-macOS-${{ matrix.arch }}.dmg
if-no-files-found: error
- uses: ./.github/actions/save-gradle-build-cache
if: always() && matrix.arch == 'arm64'
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
linux:
name: Linux (${{ matrix.label }})
@@ -289,8 +296,7 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: ${{ matrix.arch == 'arm64' }}
id: gradle-build-cache
- uses: actions/download-artifact@v5
with:
name: desktop-proguard
@@ -320,6 +326,10 @@ jobs:
app/desktop/build/distributions/release/*-linux-${{ matrix.arch }}.rpm
app/desktop/build/distributions/release/*-linux-${{ matrix.arch }}.AppImage
if-no-files-found: error
- uses: ./.github/actions/save-gradle-build-cache
if: always() && matrix.arch == 'arm64'
with:
primary-key: ${{ steps.gradle-build-cache.outputs.cache-primary-key }}
android:
name: Android
@@ -334,8 +344,6 @@ jobs:
with:
version: ${{ needs.resolve-version.outputs.version }}
- uses: ./.github/actions/cache-gradle-build
with:
save: "false"
- name: Cache Android SDK extras
uses: actions/cache@v5
with: