File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 5353 pull-requests : write
5454 runs-on : ubuntu-latest
5555 steps :
56+ - name : ' Generate token'
57+ id : GENERATE_TOKEN
58+ uses : actions/create-github-app-token@v2
59+ with :
60+ app-id : ${{ secrets.BOT_APP_ID }}
61+ private-key : ${{ steps.decode.outputs.private-key }}
62+
63+ - name : Get GitHub App User ID
64+ id : get-user-id
65+ run : echo "user-id=$(gh api "/users/${{ steps.GENERATE_TOKEN.outputs.app-slug }}" --jq .id)" >> "$GITHUB_OUTPUT"
66+ env :
67+ GH_TOKEN : ${{ steps.GENERATE_TOKEN.outputs.token }}
68+
69+ - name : Set global username and email
70+ run : |
71+ git config --global user.name '${{ steps.GENERATE_TOKEN.outputs.app-slug }}'
72+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.GENERATE_TOKEN.outputs.app-slug }}[bot]@users.noreply.github.com'
73+
5674 - name : Checkout
5775 uses : actions/checkout@v4
5876
7896 with :
7997 inputs : " *.tgz"
8098
99+ - name : Debug auth
100+ run : |
101+ curl -s -H "Authorization: token ${{ steps.GENERATE_TOKEN.outputs.token }}" https://api.github.com/user
102+
81103 - name : Run Semantic Release
82104 env :
83- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
105+ GITHUB_TOKEN : ${{ steps.GENERATE_TOKEN.outputs.token }}
84106 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
85107 run : npx semantic-release
You can’t perform that action at this time.
0 commit comments