From 628c246c1c96e679590aebc56da748a14fca9b77 Mon Sep 17 00:00:00 2001 From: Maxwell Huang-Hobbs Date: Wed, 13 Nov 2024 22:02:37 +0000 Subject: [PATCH] publish.yml: don't crash when there are change files --- .github/workflows/publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 68622fc..0aa5524 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -61,14 +61,14 @@ jobs: git remote set-url origin https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git # Generate changes from beachball, including package.json version bump - yarn beachball bump - - # Check if that contains changefiles - git diff --exit-code -- ./change - echo "OUTPUT_STATUS=$?" >> "$GITHUB_OUTPUT" + if yarn beachball bump | grep "Removing change files:"; then + echo "HAS_CHANGES=true" >> "$GITHUB_OUTPUT" + else + echo "HAS_CHANGES=false" >> "$GITHUB_OUTPUT" + fi shell: bash - name: Publish - if: ${{ steps.check_changes.outputs.OUTPUT_STATUS == 1 }} + if: ${{ steps.check_changes.outputs.HAS_CHANGES == true }} run: | git config user.email "mhuan13@gmail.com" git config user.name "$GITHUB_ACTOR"