Skip to content

Commit b1f7c75

Browse files
committed
Fix workflow to handle README already having correct version
- Add git diff check before committing README changes - Prevents 'nothing to commit' error when README already has correct version - Workflow now handles JitPack cache scenarios gracefully - Ready for clean v1.0.0 release
1 parent b0f081d commit b1f7c75

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,16 @@ jobs:
187187
# Now that JitPack succeeded, update README with new version
188188
echo "📝 Updating README.md with confirmed working version..."
189189
sed -i "s/<version>v[^<]*<\/version>/<version>v$NEW_VERSION<\/version>/" README.md
190-
git add README.md
191-
git commit -m "Update README.md to version $NEW_VERSION after JitPack success"
192-
git push origin main
190+
191+
# Check if README actually changed
192+
if git diff --quiet README.md; then
193+
echo "📄 README.md already has correct version v$NEW_VERSION"
194+
else
195+
git add README.md
196+
git commit -m "Update README.md to version $NEW_VERSION after JitPack success"
197+
git push origin main
198+
echo "📝 README.md updated successfully"
199+
fi
193200
194201
echo "🎉 Release $NEW_VERSION completed successfully!"
195202
exit 0

0 commit comments

Comments
 (0)