Skip to content

Commit

Permalink
Revert "chore: merge yarn and build cache"
Browse files Browse the repository at this point in the history
This reverts commit 84bb2db.
  • Loading branch information
Karol Sójko committed Oct 14, 2022
1 parent 84bb2db commit b8a7581
Showing 1 changed file with 96 additions and 54 deletions.
150 changes: 96 additions & 54 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -30,13 +23,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand All @@ -55,13 +62,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -70,13 +70,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand All @@ -98,13 +112,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -113,13 +120,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand All @@ -141,13 +162,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -156,13 +170,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand All @@ -184,13 +212,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -199,13 +220,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand Down Expand Up @@ -251,13 +286,6 @@ jobs:
token: ${{ secrets.CI_PAT_TOKEN }}
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
Expand All @@ -266,13 +294,27 @@ jobs:
id: cache-build
uses: actions/cache@v3
with:
path: [ packages/**/dist, ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
path: packages/**/dist
key: ${{ runner.os }}-workspace-build

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v3
with:
path: [ ${{ steps.yarn-cache-dir-path.outputs.dir }}, packages/**/node_modules ]
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Build
Expand Down

0 comments on commit b8a7581

Please sign in to comment.