Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit 1da84df

Browse files
honnixclaude
andcommitted
fix: add sign-off to release commits for DCO check
The maven-release-plugin creates version bump commits on master, which fail the DCO required status check. Add a prepare-commit-msg git hook in the release workflow to automatically append Signed-off-by trailer. Signed-off-by: Hongxin Liang <honnix@gmail.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Hongxin Liang <honnix@users.noreply.github.com>
1 parent 25c7256 commit 1da84df

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ jobs:
4141
git config --global user.email ${{ github.actor }}@users.noreply.github.com
4242
git config --global user.name ${{ github.actor }}
4343
44+
- name: Enable automatic sign-off for DCO
45+
run: |
46+
mkdir -p "$HOME/.config/git/hooks"
47+
printf '#!/bin/bash\nif ! grep -q "^Signed-off-by:" "$1"; then\n git interpret-trailers --in-place --trailer "Signed-off-by: $(git config user.name) <$(git config user.email)>" "$1"\nfi\n' > "$HOME/.config/git/hooks/prepare-commit-msg"
48+
chmod +x "$HOME/.config/git/hooks/prepare-commit-msg"
49+
git config --global core.hooksPath "$HOME/.config/git/hooks"
50+
4451
- name: Publish to MavenCentral
4552
run: |
4653
export GPG_TTY=$(tty)

0 commit comments

Comments
 (0)