From c93dfddb8d2dd594588327cab0e19362938f055e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B0=A1=E7=A2=A9=E8=BE=B0?= Date: Wed, 8 Apr 2026 00:57:17 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20action.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 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-