From 06508f7de66eab03638ecf128a09a14a4f207c2f Mon Sep 17 00:00:00 2001 From: Julian Skinner Date: Fri, 25 Aug 2023 11:55:48 -0500 Subject: [PATCH] ci: update publish to cache and restore build assets --- .github/workflows/release-deploy-v2.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release-deploy-v2.yml b/.github/workflows/release-deploy-v2.yml index 87fdf661b9..797c73f165 100644 --- a/.github/workflows/release-deploy-v2.yml +++ b/.github/workflows/release-deploy-v2.yml @@ -141,6 +141,15 @@ jobs: if: steps.restore-sage-lib-node-modules.outputs.cache-hit != true run: yarn install --frozen-lockfile + - name: Cache build assets + uses: actions/cache@v3 + id: sage-lib-build-assets + env: + cache-name: sage-lib-build-assets + with: + path: 'packages/**' + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + - name: Build run: yarn build @@ -192,6 +201,19 @@ jobs: - name: Lerna Boostrap run: npx lerna bootstrap --ci + - name: Restore Build assets + uses: actions/cache/restore@v3 + id: restore-sage-lib-build-assets + env: + cache-name: sage-lib-build-assets + with: + path: 'packages/**' + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }} + + - name: Check Build Assets cache hit + if: steps.restore-sage-lib-build-assets.outputs.cache-hit != 'true' + run: exit 1 + - name: Lerna Publish run: npx lerna publish --registry github --yes