From d915ca6870b1a43fd32563baf95b6259281d64f2 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Thu, 15 Jun 2023 12:12:53 -0400 Subject: [PATCH] chore(ci): use local version of lerna (#27656) Issue number: N/A --------- ## What is the current behavior? [GitHub Actions comes with Lerna 7 preinstalled](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#project-management) which has a breaking change for `lerna bootstrap`. This is causing Dev builds and releases to intermittently fail despite our `package.json` wanting Lerna 5. ## What is the new behavior? - Ensure that the local version of Lerna is used instead of the global Lerna. Long term we should look to update to Lerna 7 and migrate off `lerna bootstrap`. ## Does this introduce a breaking change? - [ ] Yes - [x] No ## Other information --- .github/workflows/actions/publish-npm/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/actions/publish-npm/action.yml b/.github/workflows/actions/publish-npm/action.yml index 2c482c4fff..4022753792 100644 --- a/.github/workflows/actions/publish-npm/action.yml +++ b/.github/workflows/actions/publish-npm/action.yml @@ -22,15 +22,17 @@ runs: - uses: actions/setup-node@v3 with: node-version: 16.x - - name: Install latest npm - run: npm install -g npm@latest + # This ensures the local version of Lerna is installed + # and that we do not use the global Lerna version + - name: Install root dependencies + run: npm ci shell: bash - name: Install Dependencies - run: lerna bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps + run: npx lerna bootstrap --include-dependencies --scope ${{ inputs.scope }} --ignore-scripts -- --legacy-peer-deps shell: bash working-directory: ${{ inputs.working-directory }} - name: Update Version - run: lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }} + run: npx lerna version ${{ inputs.version }} --yes --exact --no-changelog --no-push --no-git-tag-version --preid=${{ inputs.preid }} shell: bash working-directory: ${{ inputs.working-directory }} - name: Run Build