Skip to content

Commit bfceb6a

Browse files
committed
chore: fix kotlin native caching
1 parent ac0d0c1 commit bfceb6a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,17 @@ jobs:
9494
if: ${{ false }}
9595
uses: gradle/actions/setup-gradle@v4
9696

97+
- name: 📖 Get Kotlin version
98+
id: kotlin-version
99+
run: |
100+
KOTLIN_VERSION=$(grep "^kotlin[[:space:]]*=" gradle/libs.versions.toml | cut -d '"' -f2)
101+
echo "version=$KOTLIN_VERSION" >> "$GITHUB_OUTPUT"
102+
97103
- name: 💽 Cache Kotlin Native
98104
uses: actions/cache@v4
99105
with:
100106
path: ~/.konan
101-
key: ${{ runner.os }}-konan-${{ hashFiles('**/gradle/libs.versions.toml') }}
102-
restore-keys: |
103-
${{ runner.os }}-konan-
107+
key: konan-${{ runner.os }}-${{ steps.kotlin-version.outputs.version }}
104108

105109
- name: 🏗️ Gradle Build & Run
106110
id: gradle-build

0 commit comments

Comments
 (0)