From 79aefb1c78c59d0adcbb496c3694504761890cf5 Mon Sep 17 00:00:00 2001 From: Yakiyo Date: Thu, 15 Jun 2023 23:50:33 +0600 Subject: [PATCH] Add example for dart --- examples.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/examples.md b/examples.md index 1bcde91..541f102 100644 --- a/examples.md +++ b/examples.md @@ -5,6 +5,7 @@ - [D - DUB](#d---dub) - [POSIX](#posix) - [Windows](#windows) +- [Dart](#dart) - [Deno](#deno) - [Linux](#linux) - [macOS](#macos) @@ -119,6 +120,26 @@ steps: restore-keys: | ${{ 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