commit c93dfddb8d2dd594588327cab0e19362938f055e Author: 簡碩辰 Date: Wed Apr 8 00:57:17 2026 +0000 新增 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..f4150ec --- /dev/null +++ b/action.yml @@ -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-