From e6c4b5dbb3d0ab04f2d6814634e6765196abfa7a Mon Sep 17 00:00:00 2001 From: j75689 Date: Fri, 15 Oct 2021 21:01:40 +0800 Subject: [PATCH] ci: add cache for go build --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7e641d641..1633752c23 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,22 @@ jobs: - name: Checkout Code uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + # In order: + # * Module download cache + # * Build cache (Linux) + # * Build cache (Mac) + # * Build cache (Windows) + path: | + ~/go/pkg/mod + ~/.cache/go-build + ~/Library/Caches/go-build + %LocalAppData%\go-build + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + # ============================== # Linux/Macos/Windows Build # ==============================