From 002d3a77f4c5d6c87f0444cd90c0464892209ff7 Mon Sep 17 00:00:00 2001 From: Nogic <24802730+nogic1008@users.noreply.github.com> Date: Tue, 10 Dec 2019 09:21:47 +0900 Subject: [PATCH] Use Personal Cache Folder in C# Example Ref: #115 --- examples.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/examples.md b/examples.md index 716f2bb..cc5da9e 100644 --- a/examples.md +++ b/examples.md @@ -1,6 +1,6 @@ # Examples -- [C# - Nuget](#c---nuget) +- [C# - NuGet](#c---nuget) - [Elixir - Mix](#elixir---mix) - [Go - Modules](#go---modules) - [Java - Gradle](#java---gradle) @@ -14,16 +14,21 @@ - [Swift, Objective-C - Carthage](#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods) -## C# - Nuget +## C# - NuGet Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies): ```yaml -- uses: actions/cache@v1 - with: - path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - restore-keys: | - ${{ runner.os }}-nuget- +env: + # Use personal cache folder because global cache may have huge packages like Xamarin. + # Learn more, see issue #115. + NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages +steps: + - uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} + restore-keys: | + ${{ runner.os }}-nuget- ``` ## Elixir - Mix