mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-12-25 12:05:53 +00:00
Add example for dart
This commit is contained in:
parent
67b839edb6
commit
79aefb1c78
1 changed files with 21 additions and 0 deletions
21
examples.md
21
examples.md
|
@ -5,6 +5,7 @@
|
||||||
- [D - DUB](#d---dub)
|
- [D - DUB](#d---dub)
|
||||||
- [POSIX](#posix)
|
- [POSIX](#posix)
|
||||||
- [Windows](#windows)
|
- [Windows](#windows)
|
||||||
|
- [Dart](#dart)
|
||||||
- [Deno](#deno)
|
- [Deno](#deno)
|
||||||
- [Linux](#linux)
|
- [Linux](#linux)
|
||||||
- [macOS](#macos)
|
- [macOS](#macos)
|
||||||
|
@ -119,6 +120,26 @@ steps:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-dub-
|
${{ runner.os }}-dub-
|
||||||
```
|
```
|
||||||
|
## Dart
|
||||||
|
|
||||||
|
### Linux / Macos
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.pub-cache/
|
||||||
|
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
On windows the global package cache is located at `%LOCALAPPDATA%\Pub\Cache` but may vary due to different windows version. Refer to the [docs](https://dart.dev/tools/pub/cmd/pub-get#the-system-package-cache)
|
||||||
|
```yaml
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/AppData/Local/Pub/Cache/
|
||||||
|
key: ${{ runner.os }}-dart-${{ hashFiles('**/pubspec.lock') }}
|
||||||
|
```
|
||||||
|
|
||||||
## Deno
|
## Deno
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue