From 575857d993ab9d9f12592161c0a51b54e1271b4c Mon Sep 17 00:00:00 2001 From: Cameron Rye Date: Thu, 13 Nov 2025 14:54:20 -0500 Subject: [PATCH] fix: prevent rollback steps from running in dry run mode The rollback steps were incorrectly evaluating when the publish/push steps were skipped due to dry_run mode. This caused the workflow to fail even when the actual release steps succeeded. Added dry_run check to both rollback step conditions to ensure they only run when: 1. Not in dry run mode 2. The corresponding step actually failed --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb0552a..8726308 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -102,7 +102,7 @@ jobs: continue-on-error: true - name: Rollback on push failure - if: steps.push.outcome == 'failure' + if: ${{ !inputs.dry_run && steps.push.outcome == 'failure' }} run: | echo "❌ Push failed, rolling back..." git tag -d ${{ steps.version.outputs.new_version }} @@ -119,7 +119,7 @@ jobs: continue-on-error: true - name: Rollback on publish failure - if: steps.publish.outcome == 'failure' + if: ${{ !inputs.dry_run && steps.publish.outcome == 'failure' }} run: | echo "❌ npm publish failed, rolling back..." git push origin :refs/tags/${{ steps.version.outputs.new_version }}