Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/generate-protobuf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ jobs:
run: mise run generate
- name: Validate and export generated sources as a patch
run: |
UNEXPECTED=$(git diff --name-only | grep -v '\.java$' || true)
CHANGED=$(git diff --name-only; git ls-files --others --exclude-standard)
UNEXPECTED=$(echo "$CHANGED" | sed '/^$/d' | grep -v '\.java$' || true)
if [[ -n "$UNEXPECTED" ]]; then
echo "::error::Unexpected files changed:"
echo "$UNEXPECTED"
exit 1
fi
git diff --binary > /tmp/protobuf-sources.patch
git add -A -- '*.java'
git diff --cached --binary > /tmp/protobuf-sources.patch
- name: Upload generated patch
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down Expand Up @@ -83,11 +85,14 @@ jobs:
echo "No generated changes to commit"
exit 0
fi
git apply "$PATCH"
git apply --index "$PATCH"
if git diff --cached --quiet; then
echo "No generated changes to commit"
exit 0
fi
# Note: GITHUB_TOKEN pushes don't trigger CI re-runs.
# Close and reopen the PR to trigger CI after this commit.
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add '*.java'
git commit -m "chore: regenerate protobuf sources"
git push
30 changes: 15 additions & 15 deletions mise.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
hugo = "0.163.3"
java = "temurin-25.0.3+9.0.LTS"
node = "24.18.0"
protoc = "35.0"
protoc = "35.1"

# Linters
actionlint = "1.7.12"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<automatic.module.name>--module-name-need-to-be-overridden--</automatic.module.name>
<protobuf-java.version>4.35.0</protobuf-java.version>
<protobuf-java.version>4.35.1</protobuf-java.version>
<guava.version>33.6.0-jre</guava.version>
<junit-pioneer.version>2.3.0</junit-pioneer.version>
<awaitility.version>4.3.0</awaitility.version>
Expand Down
Loading