From a289ff8a67075015701cad9d7032fe3b67f70693 Mon Sep 17 00:00:00 2001 From: winches <329487092@qq.com> Date: Tue, 10 Dec 2024 23:33:09 +0800 Subject: [PATCH] ci: when build fail will exit the release process (#4319) --- .github/workflows/release.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9da665a574..4ef02e9374 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,9 +27,18 @@ jobs: run: pnpm test - name: Build - run: pnpm build + id: build + continue-on-error: false + # Custom turbo build failure information + run: | + pnpm build || { + echo "Turbo build failed with exit code $?" + exit 1 + } - name: Create Release Pull Request or Publish to NPM + # Run only if the build is successful + if: steps.build.outcome == 'success' id: changesets uses: changesets/action@v1 with: @@ -43,7 +52,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create canary release - if: steps.changesets.outputs.published != 'true' + if: steps.build.outcome == 'success' && steps.changesets.outputs.published != 'true' timeout-minutes: 15 run: | git checkout canary