diff --git a/.github/workflows/expo-preview.yml b/.github/workflows/expo-preview.yml index 5aacb6ef..3f0993b7 100644 --- a/.github/workflows/expo-preview.yml +++ b/.github/workflows/expo-preview.yml @@ -23,20 +23,18 @@ jobs: expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} expo-cache: true - - name: Get yarn cache + - name: Restore yarn cache id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Check yarn cache - uses: actions/cache@v1 + uses: actions/cache@master with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies - run: yarn + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile - name: Publish Expo app working-directory: ./example diff --git a/.github/workflows/expo.yml b/.github/workflows/expo.yml index 93d4efd1..34be1ab1 100644 --- a/.github/workflows/expo.yml +++ b/.github/workflows/expo.yml @@ -25,19 +25,18 @@ jobs: expo-password: ${{ secrets.EXPO_CLI_PASSWORD }} expo-cache: true - - name: Get yarn cache + - name: Restore yarn cache id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v1 + uses: actions/cache@master with: - path: ${{ steps.yarn-cache.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + path: | + node_modules + */*/node_modules + key: ${{ runner.os }}-yarn-v1-${{ hashFiles('**/yarn.lock') }} - name: Install dependencies - run: yarn + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install --frozen-lockfile - name: Publish Expo app working-directory: ./example