File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262 - name : Build
6363 run : pnpm build
6464
65- - uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
66- id : app-token
65+ - uses : ./.github/ actions/setup-bot-auth
66+ id : bot-auth
6767 with :
6868 client-id : ${{ vars.APP_CLIENT_ID }}
6969 private-key : ${{ secrets.APP_PRIVATE_KEY }}
7474 id : changesets
7575 uses : ./version
7676 with :
77- github-token : ${{ steps.app-token.outputs.token }}
77+ github-token : ${{ steps.bot-auth.outputs.token }}
78+ setup-git-user : false
7879 script : pnpm bump
7980
8081 publish :
8788 permissions :
8889 contents : write # to create release and have it authored by github-actions (changesets/action)
8990 steps :
90- - uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
91- id : app-token
92- with :
93- client-id : ${{ vars.APP_CLIENT_ID }}
94- private-key : ${{ secrets.APP_PRIVATE_KEY }}
95- permission-contents : write # to bypass branch and tag protection rules (release.ts)
96-
9791 - name : Check out repo
9892 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
9993 with :
@@ -106,8 +100,15 @@ jobs:
106100 - name : Build
107101 run : pnpm build
108102
103+ - uses : ./.github/actions/setup-bot-auth
104+ id : bot-auth
105+ with :
106+ client-id : ${{ vars.APP_CLIENT_ID }}
107+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
108+ permission-contents : write # to bypass branch and tag protection rules (release.ts)
109+
109110 - name : Publish to marketplace
110111 uses : ./publish
111112 with :
112- github-token : ${{ steps.app-token .outputs.token }}
113+ github-token : ${{ steps.bot-auth .outputs.token }}
113114 script : pnpm release
Original file line number Diff line number Diff line change @@ -122,13 +122,6 @@ jobs:
122122 pull-requests : write # to comment on the pull request with the release result (changesets/action)
123123
124124 steps :
125- - uses : actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
126- id : app-token
127- with :
128- client-id : ${{ vars.APP_CLIENT_ID }}
129- private-key : ${{ secrets.APP_PRIVATE_KEY }}
130- permission-contents : write # to push the release snapshot branch (release-pr.ts)
131-
132125 - name : Check out repo
133126 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
134127 with :
@@ -173,15 +166,17 @@ jobs:
173166 - name : Build
174167 run : pnpm build
175168
176- - name : Setup Git user
177- run : |
178- git config --global user.name "github-actions[bot]"
179- git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
169+ - uses : ./.github/actions/setup-bot-auth
170+ id : bot-auth
171+ with :
172+ client-id : ${{ vars.APP_CLIENT_ID }}
173+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
174+ permission-contents : write # to push the release snapshot branch (release-pr.ts)
180175
181176 - name : Release snapshot version
182177 run : pnpm release:pr
183178 env :
184- GITHUB_TOKEN : ${{ steps.app-token .outputs.token }}
179+ GITHUB_TOKEN : ${{ steps.bot-auth .outputs.token }}
185180
186181 - name : Add success reaction
187182 run : gh api "/repos/$GH_REPO/issues/comments/$COMMENT_ID/reactions" -f content='rocket'
You can’t perform that action at this time.
0 commit comments