14
14
type : " string"
15
15
16
16
env :
17
- # TODO: Use different token
18
- GH_TOKEN : ${{ secrets.MERGE_UP_TOKEN }}
19
- GIT_AUTHOR_NAME : " DBX PHP Release Bot"
20
- GIT_AUTHOR_EMAIL :
" [email protected] "
21
17
default-release-message : |
22
18
The PHP team is happy to announce that version {0} of the MongoDB PHP library is now available.
23
19
41
37
42
38
jobs :
43
39
prepare-release :
40
+ environment : release
44
41
name : " Prepare release"
45
42
runs-on : ubuntu-latest
43
+ permissions :
44
+ id-token : write
45
+ contents : write
46
46
47
47
steps :
48
48
- name : " Create release output"
49
49
run : echo '🎬 Release process for version ${{ inputs.version }} started by @${{ github.triggering_actor }}' >> $GITHUB_STEP_SUMMARY
50
50
51
+ - name : " Create temporary app token"
52
+ uses : actions/create-github-app-token@v1
53
+ id : app-token
54
+ with :
55
+ app-id : ${{ vars.APP_ID }}
56
+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
57
+
58
+ - name : " Store GitHub token in environment"
59
+ run : echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
60
+ shell : bash
61
+
51
62
- uses : actions/checkout@v4
52
63
with :
53
64
submodules : true
@@ -75,10 +86,12 @@ jobs:
75
86
# Preliminary checks done - commence the release process
76
87
#
77
88
78
- - name : " Set git author information"
79
- run : |
80
- git config user.name "${GIT_AUTHOR_NAME}"
81
- git config user.email "${GIT_AUTHOR_EMAIL}"
89
+ - name : " Set up drivers-github-tools"
90
+ uses : mongodb-labs/drivers-github-tools/setup@v2
91
+ with :
92
+ aws_role_arn : ${{ secrets.AWS_ROLE_ARN }}
93
+ aws_region_name : ${{ vars.AWS_REGION_NAME }}
94
+ aws_secret_id : ${{ secrets.AWS_SECRET_ID }}
82
95
83
96
# Create a draft release with release message filled in
84
97
- name : " Prepare release message"
@@ -92,13 +105,9 @@ jobs:
92
105
93
106
# This step creates the signed release tag
94
107
- name : " Create release tag"
95
- uses : mongodb-labs/drivers-github-tools/garasign/ git-sign@v1
108
+ uses : mongodb-labs/drivers-github-tools/git-sign@v2
96
109
with :
97
- command : " git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ vars.GPG_KEY_ID }} ${{ inputs.version }}"
98
- garasign_username : ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
99
- garasign_password : ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
100
- artifactory_username : ${{ secrets.ARTIFACTORY_USER }}
101
- artifactory_password : ${{ secrets.ARTIFACTORY_PASSWORD }}
110
+ command : " git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ env.GPG_KEY_ID }} ${{ inputs.version }}"
102
111
103
112
# TODO: Manually merge using ours strategy. This avoids merge-up pull requests being created
104
113
# Process is:
0 commit comments