File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change 11name : CI Pipeline 
2+ run-name : ${{ github.actor }} is automatically publishing 
23
34on :
45  push :
5354      pull-requests : write 
5455    runs-on : ubuntu-latest 
5556    steps :
57+       - name : ' Generate token' 
58+         id : GENERATE_TOKEN 
59+         uses : actions/create-github-app-token@v2 
60+         with :
61+           app-id : ${{ secrets.BOT_APP_ID }} 
62+           private-key : ${{ secrets.BOT_PRIVATE_KEY }} 
63+ 
64+       - name : Get GitHub App User ID 
65+         id : get-user-id 
66+         run : echo "user-id=$(gh api "/users/${{ steps.GENERATE_TOKEN.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" 
67+         env :
68+           GH_TOKEN : ${{ steps.GENERATE_TOKEN.outputs.token }} 
69+ 
70+       - name : Set global username and email 
71+         run : | 
72+           git config --global user.name '${{ steps.GENERATE_TOKEN.outputs.app-slug }}[bot]' 
73+           git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.GENERATE_TOKEN.outputs.app-slug }}[bot]@users.noreply.github.com' 
74+ 
5675       - name : Checkout 
5776        uses : actions/checkout@v4 
5877
7897        with :
7998          inputs : " *.tgz" 
8099
100+       - name : Debug auth 
101+         run : | 
102+           curl -s -H "Authorization: token ${{ steps.GENERATE_TOKEN.outputs.token }}" https://api.github.com/user 
103+ 
81104       - name : Run Semantic Release 
82105        env :
83-           GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN  }} 
106+           GITHUB_TOKEN : ${{ steps.GENERATE_TOKEN.outputs.token  }} 
84107          NPM_TOKEN : ${{ secrets.NPM_TOKEN }} 
85108        run : npx semantic-release 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments