fix actions/cache

This commit is contained in:
an-lee
2024-03-01 11:53:13 +08:00
parent b83ac26b3b
commit 3e55b39452

View File

@@ -26,17 +26,11 @@ jobs:
with:
node-version: 20
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install
@@ -68,5 +62,5 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Enjoy-${{ github.event.inputs.os }}-${{ github.event.inputs.arch }}-build
name: Enjoy-${{ runner.os }}-${{ github.event.inputs.arch }}-build
path: enjoy/out/make/**/*