From 6368098c69fdef52bff218c75db8f2ab103f20de Mon Sep 17 00:00:00 2001 From: rahuljain-dev Date: Tue, 3 Oct 2023 12:04:10 +0530 Subject: [PATCH] ELEMENTS-1677: build failed while generating a snapshot for elements project --- .github/workflows/main.yaml | 4 ++-- .github/workflows/preview.yaml | 2 +- .github/workflows/promote.yaml | 16 ++++++++++------ .github/workflows/storybook.yaml | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b34ab48deb..8919ce4fa5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -55,7 +55,7 @@ jobs: - name: Set version to ${{ env.VERSION }} run: | npm version $VERSION --no-git-tag-version - npx lerna version $VERSION --no-push --force-publish --no-git-tag-version --yes + npx lerna@6.62 version $VERSION --no-push --force-publish --no-git-tag-version --yes - name: Tag run: | @@ -66,4 +66,4 @@ jobs: - name: Publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} - run: npx lerna exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --tag SNAPSHOT + run: npx lerna@6.62 exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --tag SNAPSHOT diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 06e1d919e0..38770bd124 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -40,7 +40,7 @@ jobs: npm run bootstrap - name: Run analysis - run: npx lerna run analysis --parallel + run: npx lerna@6.62 run analysis --parallel - name: Build storybook working-directory: ./storybook diff --git a/.github/workflows/promote.yaml b/.github/workflows/promote.yaml index 1dc59f2c55..56853e5f32 100644 --- a/.github/workflows/promote.yaml +++ b/.github/workflows/promote.yaml @@ -15,6 +15,10 @@ on: type: boolean required: false +variables: +- name: lernaVersion + value: 6.6.2 + jobs: promote: runs-on: ubuntu-latest @@ -36,7 +40,7 @@ jobs: - name: Update Nuxeo Elements version to ${{ env.VERSION }} run: | npm version $VERSION --no-git-tag-version - npx lerna version $VERSION --no-push --force-publish --no-git-tag-version --yes + npx lerna@{{lernaVersion}} version $VERSION --no-push --force-publish --no-git-tag-version --yes - name: Tag Nuxeo Elements v${{ env.VERSION }} run: | @@ -60,21 +64,21 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} run: | - npx lerna exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/ --dry-run + npx lerna@{{lernaVersion}} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/ --dry-run - name: Publish to https://packages.nuxeo.com/repository/npm-public/ if: ${{ github.event.inputs.dryRun == 'false' }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_PACKAGES_TOKEN }} run: | - npx lerna exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/ + npx lerna@{{lernaVersion}} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://packages.nuxeo.com/repository/npm-public/ - name: Publish to https://registry.npmjs.org (dry run) if: ${{ github.event.inputs.dryRun == 'true' }} env: NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} run: | - npx lerna exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public --dry-run + npx lerna@{{lernaVersion}} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public --dry-run - name: Publish to https://registry.npmjs.org continue-on-error: true @@ -82,7 +86,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }} run: | - npx lerna exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public + npx lerna@{{lernaVersion}} exec --ignore @nuxeo/nuxeo-elements-storybook -- npm publish --@nuxeo:registry=https://registry.npmjs.org/ --access public - uses: actions/checkout@v2 with: @@ -98,7 +102,7 @@ jobs: - name: Align ${{ github.event.inputs.referenceBranch }} branch on next version ${{ env.NEW_VERSION }} run: | npm version $NEW_VERSION --no-git-tag-version - npx lerna version $NEW_VERSION --no-push --force-publish --no-git-tag-version --yes + npx lerna@{{lernaVersion}} version $NEW_VERSION --no-push --force-publish --no-git-tag-version --yes # commit and push git commit -a -m "Update to $NEW_VERSION" diff --git a/.github/workflows/storybook.yaml b/.github/workflows/storybook.yaml index 7e7b360134..b55a006a69 100644 --- a/.github/workflows/storybook.yaml +++ b/.github/workflows/storybook.yaml @@ -41,7 +41,7 @@ jobs: npm run bootstrap - name: Run analysis - run: npx lerna run analysis --parallel + run: npx lerna@6.62 run analysis --parallel - name: Build storybook working-directory: storybook