From a3e09506bd7c67bf27390818f4a63830398c6255 Mon Sep 17 00:00:00 2001 From: Nidhi Date: Mon, 22 May 2023 18:35:13 +0530 Subject: [PATCH] ci: Add yarn install step to github-release-workflow (#23593) (#23601) Cherry picking workflow to allow github release workflow to go through Co-authored-by: Satish Gandham Co-authored-by: Satish Gandham --- .github/workflows/github-release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 19baab54e9..63174275aa 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -172,6 +172,23 @@ jobs: with: node-version: "16.14.0" + # actions/setup-node@v3 doesn’t work properly with Yarn 3 + # when the project lives in a subdirectory: https://github.com/actions/setup-node/issues/488 + # Restoring the cache manually instead + - name: Restore Yarn cache + if: steps.run_result.outputs.run_result != 'success' + uses: actions/cache@v3 + with: + path: app/.yarn/cache + key: v1-yarn3-${{ hashFiles('app/yarn.lock') }} + restore-keys: | + v1-yarn3- + + # Install all the dependencies + - name: Install dependencies + if: steps.run_result.outputs.run_result != 'success' + run: yarn install --immutable + - name: Build run: | echo 'export const VERSION = "${{ needs.prelude.outputs.tag }}"' > src/version.js