Fix release workflow to handle unchanged build files gracefully

- Use git diff --staged --quiet to only commit if there are changes
- Make push fail gracefully to allow release creation to continue
- Resolves issue where workflow fails when dist/index.js hasn't changed
This commit is contained in:
Claude
2025-11-14 15:39:43 +00:00
parent b9e6f2771a
commit c87aa2333a

View File

@@ -30,8 +30,8 @@ jobs:
git config --global user.name 'claude-code-review[bot]'
git config --global user.email 'claude-code-review[bot]@users.noreply.github.com'
git add -f dist
git commit -m 'Add built files'
git push origin HEAD:main
git diff --staged --quiet || git commit -m 'Add built files'
git push origin HEAD:main || echo "No changes to push or push failed"
- name: Create Release
uses: softprops/action-gh-release@v1