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 23b1bf5 commit 2f26bb5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,16 @@ 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 "changes!"
echo "HAS_CHANGES=true" >> "$GITHUB_OUTPUT"
else
echo "no changes!"
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 2f26bb5

Please sign in to comment.