@@ -11,29 +11,37 @@ jobs:
1111 runs-on : ubuntu-latest
1212 if : ${{ github.event.workflow_run.conclusion == 'success' }}
1313 steps :
14- - uses : actions/checkout@v5
14+ - uses : actions/checkout@v6
1515 with :
1616 fetch-depth : 0
1717 ref : ${{ github.event.workflow_run.head_branch }}
1818 - uses : actions/setup-node@v6
1919 with :
20- node-version : 22
20+ node-version : 24
2121 cache : ' npm'
2222 registry-url : https://registry.npmjs.org/
23+ - name : Update npm
24+ run : npm install -g npm@latest
2325 - run : npm ci
2426 - run : npm run build
25- - run : git config user.name "cerebral[bot]"
26- - run : git config user.email "136202705+cerebral[bot]@users.noreply.github.com"
27- - name : Generate token
28- id : generate_token
29- uses : tibdex/github-app-token@v1
27+ - name : Create GitHub App token
28+ id : app-token
29+ uses : actions/create-github-app-token@v3
3030 with :
31- app_id : ${{ secrets.APP_ID }}
32- private_key : ${{ secrets.PRIVATE_KEY }}
33- repository : cerebral/repo-cooker
31+ app-id : ${{ secrets.APP_ID }}
32+ private-key : ${{ secrets.PRIVATE_KEY }}
33+ - name : Get GitHub App User ID
34+ id : get-user-id
35+ run : echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
36+ env :
37+ GH_TOKEN : ${{ steps.app-token.outputs.token }}
38+ - name : Configure Git
39+ run : |
40+ git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
41+ git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
3442 - run : npm run release -- --print-release
3543 if : github.event_name != 'pull_request'
3644 env :
37- REPO_COOKER_GITHUB_TOKEN : ${{ steps.generate_token .outputs.token }}
45+ REPO_COOKER_GITHUB_TOKEN : ${{ steps.app-token .outputs.token }}
3846 NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
3947 REPO_COOKER_NPM_OTP : ${{secrets.REPO_COOKER_NPM_OTP}}
0 commit comments