From 47adcfec306215fca283f1c15c1dde0587dec691 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Wed, 10 Mar 2021 00:42:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflow/release.yml | 42 ++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflow/release.yml b/.github/workflow/release.yml index 49b5595a..97298133 100644 --- a/.github/workflow/release.yml +++ b/.github/workflow/release.yml @@ -16,8 +16,18 @@ jobs: uses: actions/setup-node@v2 with: node-version: '12' - - - run: npm run publish:gh + - name: Cache file + - uses: actions/cache@v2 + with: + path: | + node_modules + %APPDATA%\npm-cache + %LOCALAPPDATA%\electron\Cache + %LOCALAPPDATA%\electron-builder\Cache + key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build- + - run: npm install && npm run publish:gh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -31,8 +41,21 @@ jobs: uses: actions/setup-node@v2 with: node-version: '12' - - run: npm run publish:gh:mac + - name: Cache file + - uses: actions/cache@v2 + with: + path: | + node_modules + $HOME/.cache/electron + $HOME/.cache/electron-builder + $HOME/.npm/_prebuilds + key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build- + - run: npm install && npm run publish:gh:mac env: + ELECTRON_CACHE: $HOME/.cache/electron + ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} Linux: @@ -49,6 +72,17 @@ jobs: uses: actions/setup-node@v2 with: node-version: '12' - - run: npm run publish:gh:linux + - name: Cache file + - uses: actions/cache@v2 + with: + path: | + node_modules + $HOME/.cache/electron + $HOME/.cache/electron-builder + $HOME/.npm/_prebuilds + key: ${{ runner.os }}-build-caches-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build- + - run: npm install && npm run publish:gh:linux env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}