From 4205ae35a002c3181f5ee16d158e5ada696465da Mon Sep 17 00:00:00 2001 From: Marcel Richter Date: Mon, 23 Sep 2024 15:00:13 +0200 Subject: [PATCH] ci(github-actions): use create-github-app-token to generate semantic release token --- .github/workflows/release.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cc9bfd5..ef900a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,14 @@ jobs: with: token: ${{ steps.app-token.outputs.token }} persist-credentials: false + - name: Get GitHub App User ID + id: get-user-id + run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + - run: | + git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]' + git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>' - name: Semantic Release uses: cycjimmy/semantic-release-action@cb425203a562475bca039ba4dbf90c7f9ac790f4 # v4.1.0 with: