Skip to content

Commit 4150306

Browse files
committed
fix(release): configure git identity from RELEASE_PAT in finalize
Derive user.name and user.email from the RELEASE_PAT owner via GitHub API so the last-release-sha commit passes CLA checks.
1 parent dd08693 commit 4150306

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/release-finalize.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ jobs:
4444
echo "version=$VERSION" >> $GITHUB_OUTPUT
4545
echo "Extracted version: $VERSION"
4646
47+
- name: Configure git identity from RELEASE_PAT
48+
if: steps.check.outputs.is_release_pr == 'true'
49+
env:
50+
GH_TOKEN: ${{ secrets.RELEASE_PAT }}
51+
run: |
52+
USER_JSON=$(gh api user)
53+
git config user.name "$(echo "$USER_JSON" | jq -r '.login')"
54+
git config user.email "$(echo "$USER_JSON" | jq -r '.id')+$(echo "$USER_JSON" | jq -r '.login')@users.noreply.github.com"
55+
4756
- name: Record last-release-sha for release-please
4857
if: steps.check.outputs.is_release_pr == 'true'
4958
run: |

0 commit comments

Comments
 (0)