From 510350a7d865333d43428cf9477af12c2cec9b15 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Fri, 17 Apr 2026 16:33:35 -0700 Subject: [PATCH] Guard release jobs from failing workflows - Skip build, publish, and release steps when earlier jobs fail or get cancelled - Keep finalize limited to stable releases only --- .github/workflows/release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6110d1bb4..eaa8383616 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -171,6 +171,7 @@ jobs: build: name: Build ${{ matrix.label }} needs: preflight + if: ${{ !failure() && !cancelled() }} runs-on: ${{ matrix.runner }} timeout-minutes: 30 strategy: @@ -353,6 +354,7 @@ jobs: publish_cli: name: Publish CLI to npm needs: [preflight, build] + if: ${{ !failure() && !cancelled() }} runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10 steps: @@ -387,6 +389,7 @@ jobs: release: name: Publish GitHub Release needs: [preflight, build, publish_cli] + if: ${{ !failure() && !cancelled() }} runs-on: ubuntu-24.04 # blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10 steps: @@ -496,7 +499,7 @@ jobs: finalize: name: Finalize release - if: needs.preflight.outputs.release_channel == 'stable' + if: ${{ !failure() && !cancelled() && needs.preflight.outputs.release_channel == 'stable' }} needs: [preflight, release] runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 10