From a51cc859c719faed03304ad3c0e31b7788851986 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Nov 2025 11:48:10 +0000 Subject: [PATCH 1/3] Fix workflow cache hashFiles error Changed hashFiles pattern from Package.resolved to Package.swift because Package.resolved doesn't exist in the repository at checkout time, causing the hashFiles() function to fail. Package.swift always exists and will properly invalidate the cache when dependencies change. Fixes: hashFiles('**/Package.resolved') failed error --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcd1228..d7b2f4c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: path: | .build ~/.cache/org.swift.swiftpm - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.swift') }} restore-keys: | ${{ runner.os }}-spm- From 864359e77dcfa0826cc805b3ab2bc333014d8a60 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Nov 2025 11:50:04 +0000 Subject: [PATCH 2/3] Fix hashFiles pattern to use simple path Remove **/ glob pattern and use direct file path 'Package.swift' instead of '**/Package.swift' to avoid hashFiles validation errors in GitHub Actions. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d7b2f4c..098b30e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: path: | .build ~/.cache/org.swift.swiftpm - key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.swift') }} + key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }} restore-keys: | ${{ runner.os }}-spm- From 1de721630947a93af220b0d8814b9783af08412b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Nov 2025 11:51:48 +0000 Subject: [PATCH 3/3] Use static cache key instead of hashFiles Replace hashFiles() with static versioned cache key to avoid template validation errors. When dependencies change, increment the version number (v1 -> v2) to invalidate the cache. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 098b30e..7901c9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: path: | .build ~/.cache/org.swift.swiftpm - key: ${{ runner.os }}-spm-${{ hashFiles('Package.swift') }} + key: ${{ runner.os }}-spm-v1 restore-keys: | ${{ runner.os }}-spm-