diff --git a/.github/workflows/client-build.yml b/.github/workflows/client-build.yml index a6c040cdad..578f544916 100644 --- a/.github/workflows/client-build.yml +++ b/.github/workflows/client-build.yml @@ -156,7 +156,8 @@ jobs: fi # We burn React environment & the Segment analytics key into the build itself. - # This is to ensure that we don't need to configure it in each installation + # This is to ensure that we don't need to configure it in each installation. + # Client build fails only on errors (EXIT_CODE > 1); warnings (EXIT_CODE <= 1) don’t affect it. - name: Create the bundle if: steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' run: | @@ -171,10 +172,14 @@ jobs: REACT_APP_FARO_SOURCEMAP_UPLOAD_API_KEY=${{ secrets.REACT_APP_FARO_SOURCEMAP_UPLOAD_API_KEY }} \ REACT_APP_FARO_SOURCEMAP_UPLOAD_ENDPOINT=${{ secrets.REACT_APP_FARO_SOURCEMAP_UPLOAD_ENDPOINT }} \ REACT_APP_FARO_STACK_ID=${{ secrets.REACT_APP_FARO_STACK_ID }} \ - REACT_APP_FUSIONCHARTS_LICENSE_KEY=${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }} \ - SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ - REACT_APP_VERSION_EDITION="Community" \ - yarn build + REACT_APP_FUSIONCHARTS_LICENSE_KEY=${{ secrets.APPSMITH_FUSIONCHARTS_LICENSE_KEY }} \ + SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ + REACT_APP_VERSION_EDITION="Community" \ + yarn build || EXIT_CODE=$? + + if [ -n "$EXIT_CODE" ] && [ "$EXIT_CODE" -gt 1 ]; then + exit $EXIT_CODE + fi # Saving the cache to use it in subsequent runs - name: Save Yarn cache