diff --git a/.github/workflows/spec-update.yaml b/.github/workflows/spec-update.yaml index 57a2f8314..22aa88cd7 100644 --- a/.github/workflows/spec-update.yaml +++ b/.github/workflows/spec-update.yaml @@ -273,9 +273,6 @@ jobs: echo "api_compat_result=compatible" >> "$GITHUB_OUTPUT" else echo "api_compat_result=incompatible" >> "$GITHUB_OUTPUT" - echo "## ❌ API Compatibility: Breaking changes detected" >> $GITHUB_STEP_SUMMARY - echo "Download the **japicmp-report** artifact for details." >> $GITHUB_STEP_SUMMARY - exit 1 fi - name: 'Upload japicmp report' @@ -386,6 +383,12 @@ jobs: echo "Client generation failed. Please check the Generate step logs for details." exit 1 + - name: 'Fail if API incompatible' + if: steps.api_compat.outputs.api_compat_result == 'incompatible' + run: | + echo "API compatibility check detected breaking changes. Download the japicmp-report artifact for details." + exit 1 + - name: 'Fail if no spec changes and previous run failed' if: steps.spec_diff.outputs.prev_run_success == 'false' && github.event.inputs.is-weekly != 'true' run: |