瀏覽代碼

CI: save cache even when build failed

SukkaW 2 年之前
父節點
當前提交
2982d74a55
共有 2 個文件被更改,包括 1 次插入1 次删除
  1. 1 0
      .github/workflows/main.yml
  2. 0 1
      Build/lib/cache-filesystem.ts

+ 1 - 0
.github/workflows/main.yml

@@ -31,6 +31,7 @@ jobs:
       - name: Cache cache.db
         uses: actions/cache@v4
         with:
+          save-always: true
           path: |
             .cache
           key: ${{ runner.os }}-v1-${{ steps.date.outputs.year }}-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }} ${{ steps.date.outputs.hour }}:${{ steps.date.outputs.minute }}:${{ steps.date.outputs.second }}

+ 0 - 1
Build/lib/cache-filesystem.ts

@@ -180,7 +180,6 @@ export class Cache<S = string> {
 
       if (peeked === promise) {
         return promise.then((value) => {
-          const serializer = 'serializer' in opt ? opt.serializer : identity;
           this.set(key, serializer(value), ttl);
           return value;
         });