diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00e59929..a74a55f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,13 +18,13 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 12 - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v2 + id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - - run: yarn --frozen-lockfile --prefer-offline + path: node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} + - run: yarn --frozen-lockfile + if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn electron:publish env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -38,16 +38,16 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 12 - - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - uses: actions/cache@v2 + id: yarn-cache with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + path: node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} - run: | sudo apt-get update sudo apt-get install -y libxtst-dev libpng++-dev - - run: yarn --frozen-lockfile --prefer-offline + - run: yarn --frozen-lockfile + if: steps.yarn-cache.outputs.cache-hit != 'true' - run: yarn electron:publish env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}