Skip to content

Commit

Permalink
publish.yml: don't crash when there are change files
Browse files Browse the repository at this point in the history
  • Loading branch information
Adjective-Object committed Nov 13, 2024
1 parent 6bddb68 commit 628c246
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 628c246

Please sign in to comment.