Skip to content

Commit

Permalink
ci: when build fail will exit the release process (#4319)
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe authored Dec 10, 2024
1 parent 2b1eb1b commit a289ff8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit a289ff8

Please sign in to comment.