From e43776276fc1bf0f5f1b462661f341691905b2df Mon Sep 17 00:00:00 2001 From: Florian Kostenzer Date: Wed, 29 Jan 2020 17:13:59 +0100 Subject: [PATCH] Add Swift Package Manager (SPM) example (#159) * Add Swift - SPM to examples * Add link SPM example link to readme * remove extra newline * remove another extra newline --- README.md | 2 +- examples.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b719854..f5ed930 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ See [Examples](examples.md) for a list of `actions/cache` implementations for us - [Scala - SBT](./examples.md#scala---sbt) - [Swift, Objective-C - Carthage](./examples.md#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](./examples.md#swift-objective-c---cocoapods) - +- [Swift - Swift Package Manager](./examples.md#swift---swift-package-manager) ## Cache Limits diff --git a/examples.md b/examples.md index f729bea..cb092dd 100644 --- a/examples.md +++ b/examples.md @@ -16,6 +16,7 @@ - [Scala - SBT](#scala---sbt) - [Swift, Objective-C - Carthage](#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods) +- [Swift - Swift Package Manager](#swift---swift-package-manager) ## C# - NuGet Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies): @@ -373,3 +374,14 @@ When dependencies are installed later in the workflow, we must specify the same restore-keys: | ${{ runner.os }}-pods- ``` + +## Swift - Swift Package Manager + +```yaml +- uses: actions/cache@v1 + with: + path: .build + key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} + restore-keys: | + ${{ runner.os }}-spm- +```