Skip to content

Commit 4205ae3

Browse files
committed
ci(github-actions): use create-github-app-token to generate semantic release token
1 parent d223283 commit 4205ae3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ jobs:
3333
with:
3434
token: ${{ steps.app-token.outputs.token }}
3535
persist-credentials: false
36+
- name: Get GitHub App User ID
37+
id: get-user-id
38+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
39+
env:
40+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
41+
- run: |
42+
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
43+
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
3644
- name: Semantic Release
3745
uses: cycjimmy/semantic-release-action@cb425203a562475bca039ba4dbf90c7f9ac790f4 # v4.1.0
3846
with:

0 commit comments

Comments
 (0)