File tree Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -10,22 +10,35 @@ jobs:
10
10
prod_release :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - name : Clone repository
14
- uses : actions/checkout@v3
13
+ - name : Generate bot token
14
+ uses : actions/create-github-app-token@v1
15
+ id : app_token
15
16
with :
17
+ app-id : ${{ secrets.BOT_ID }}
18
+ private-key : ${{ secrets.BOT_SK }}
19
+
20
+ - uses : actions/checkout@v4
21
+ with :
22
+ # Fetch entire repository history so we can determine version number from it
16
23
fetch-depth : 0
24
+ token : ${{ steps.app_token.outputs.token }}
25
+
26
+ - name : Set Git user as GitHub actions
27
+ run : git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"
28
+
17
29
- name : Merge main -> release
18
30
uses : devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
19
31
with :
20
32
type : now
21
33
from_branch : main
22
34
target_branch : release
23
- github_token : ${{ secrets.GITHUB_TOKEN }}
35
+ github_token : ${{ steps.app_token.outputs.token }}
36
+
24
37
- name : Merge release -> main
25
38
uses : devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f
26
39
with :
27
40
type : now
28
41
from_branch : release
29
42
target_branch : main
30
43
message : Merge release back to main to get version increment [no ci]
31
- github_token : ${{ secrets.GITHUB_TOKEN }}
44
+ github_token : ${{ steps.app_token.outputs.token }}
Original file line number Diff line number Diff line change @@ -60,10 +60,21 @@ jobs:
60
60
needs : build
61
61
runs-on : ubuntu-latest
62
62
steps :
63
- - name : Clone repository
64
- uses : actions/checkout@v3
63
+ - name : Generate bot token
64
+ uses : actions/create-github-app-token@v1
65
+ id : app_token
65
66
with :
67
+ app-id : ${{ secrets.BOT_ID }}
68
+ private-key : ${{ secrets.BOT_SK }}
69
+
70
+ - uses : actions/checkout@v4
71
+ with :
72
+ # Fetch entire repository history so we can determine version number from it
66
73
fetch-depth : 0
74
+ token : ${{ steps.app_token.outputs.token }}
75
+
76
+ - name : Set Git user as GitHub actions
77
+ run : git config --global user.email "179917785+engineering-ci[bot]@users.noreply.github.com" && git config --global user.name "engineering-ci[bot]"
67
78
68
79
# semantic-release needs node 20
69
80
- name : Use Node.js 20.x
89
100
- name : ' Semantic release'
90
101
run : npx semantic-release
91
102
env :
92
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
103
+ GITHUB_TOKEN : ${{ steps.app_token.outputs.token }}
93
104
NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments