Skip to content

Commit d7c344e

Browse files
author
Test User
committed
fix: handle missing mycache.tar gracefully
- Add conditional check for cache file existence - Provide informative messages when cache is missing - Prevent workflow failure from missing cache file
1 parent 93f62c4 commit d7c344e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ jobs:
270270
env:
271271
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
272272

273-
- name: Restore cache
273+
- name: Restore build cache
274274
run: |
275-
tar --overwrite -xf mycache.tar
275+
if [ -f mycache.tar ]; then
276+
echo "Restoring build cache from mycache.tar..."
277+
tar --overwrite -xf mycache.tar
278+
echo "✅ Cache restored successfully"
279+
else
280+
echo "⚠️ No cache file found (mycache.tar), proceeding without cache."
281+
echo "This is normal for first runs or if cache creation was skipped."
282+
fi

0 commit comments

Comments
 (0)