File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 10
10
type : " string"
11
11
12
12
env :
13
- GH_TOKEN : ${{ github.token }}
14
13
# TODO: Adding the mongodb-dbx-release-automation app to the repository will allow fetching a one-time token and pushing
15
14
# changes on behalf of the app. This also allows bypassing branch protection rules
16
- # When the app was added, these values can be changed to use the app's data
17
- GIT_AUTHOR_NAME : " DBX Java Release Bot"
18
- GIT_AUTHOR_EMAIL :
" [email protected] "
15
+ GIT_AUTHOR_NAME : " mongodb-dbx-release-bot[bot]"
16
+ GIT_AUTHOR_EMAIL : " 167856002+mongodb-dbx-release-bot[bot]@users.noreply.github.com"
19
17
20
18
jobs :
21
19
prepare-release :
22
20
name : " Prepare release"
23
21
runs-on : ubuntu-latest
24
22
permissions :
23
+ # Write permission for id-token is necessary to generate a new token for the GitHub App
24
+ id-token : write
25
25
# Write permission for contents is to ensure we're allowed to push to the repository
26
26
contents : write
27
27
28
28
steps :
29
+ - uses : actions/create-github-app-token@v1
30
+ id : app-token
31
+ with :
32
+ app-id : ${{ vars.APP_ID }}
33
+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
34
+
35
+ - name : " Store GitHub token in environment"
36
+ run : echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
37
+
29
38
- name : " Create release output"
30
39
run : echo '🎬 Release process for version ${{ env.RELEASE_VERSION }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
31
40
32
41
- uses : actions/checkout@v4
33
42
with :
34
43
# fetch-depth 0 is required to fetch all branches and tags
35
44
fetch-depth : 0
45
+ token : ${{ steps.app-token.outputs.token }}
36
46
37
47
- name : " Store version numbers in env variables"
38
48
# The awk command to increase the version number was copied from
You can’t perform that action at this time.
0 commit comments