新增 action.yml

This commit is contained in:
簡碩辰
2026-04-08 00:57:17 +00:00
commit c93dfddb8d
+18
View File
@@ -0,0 +1,18 @@
name: 'Cache NuGet Packages'
description: '快取 NUGET 套件'
outputs:
cache-hit:
description: Whether the cache was restored from an exact key match
value: ${{ steps.cache.outputs.cache-hit }}
runs:
using: composite
steps:
- name: Restore NuGet cache
id: cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-${{ runner.arch }}-nuget-${{ hashFiles('NuGet.Config', '**/*.sln', '**/*.csproj', '**/global.json', '**/packages.lock.json', '**/Directory.Build.props', '**/Directory.Build.targets') }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-nuget-
${{ runner.os }}-nuget-