3
0
Fork 0
mirror of https://github.com/actions/cache.git synced 2024-12-05 00:39:32 +01:00

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
This commit is contained in:
Florian Kostenzer 2020-01-29 17:13:59 +01:00 committed by GitHub
parent b6d538e2aa
commit e43776276f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -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

View file

@ -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-
```