@@ -48,21 +48,11 @@ jobs:
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
51
+ - name : " Generate token and checkout repository"
52
+ uses : mongodb-labs/drivers-github-tools/secure-checkout@v2
54
53
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
-
62
- - uses : actions/checkout@v4
63
- with :
64
- submodules : true
65
- token : ${{ env.GH_TOKEN }}
54
+ app_id : ${{ vars.APP_ID }}
55
+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
66
56
67
57
- name : " Store version numbers in env variables"
68
58
run : |
@@ -103,9 +93,10 @@ jobs:
103
93
run : echo "RELEASE_URL=$(gh release create ${{ inputs.version }} --target ${{ github.ref_name }} --title "${{ inputs.version }}" --notes-file release-message --draft)" >> "$GITHUB_ENV"
104
94
105
95
- name : " Create release tag"
106
- uses : mongodb-labs/drivers-github-tools/git-sign @v2
96
+ uses : mongodb-labs/drivers-github-tools/tag-version @v2
107
97
with :
108
- command : " git tag -m 'Release ${{ inputs.version }}' -s --local-user=${{ env.GPG_KEY_ID }} ${{ inputs.version }}"
98
+ version : ${{ inputs.version }}
99
+ tag_message_template : ' Release ${VERSION}'
109
100
110
101
# TODO: Manually merge using ours strategy. This avoids merge-up pull requests being created
111
102
# Process is:
@@ -114,12 +105,6 @@ jobs:
114
105
# 3. push next branch
115
106
# 4. switch back to release branch, then push
116
107
117
- - name : " Push changes from release branch"
118
- run : git push
119
-
120
- - name : " Push release tag"
121
- run : git push origin ${{ inputs.version }}
122
-
123
108
- name : " Set summary"
124
109
run : |
125
110
echo '🚀 Created tag and drafted release for version [${{ inputs.version }}](${{ env.RELEASE_URL }})' >> $GITHUB_STEP_SUMMARY
@@ -146,21 +131,12 @@ jobs:
146
131
contents : write
147
132
148
133
steps :
149
- - name : " Create temporary app token"
150
- uses : actions/create-github-app-token@v1
151
- id : app-token
152
- with :
153
- app-id : ${{ vars.APP_ID }}
154
- private-key : ${{ secrets.APP_PRIVATE_KEY }}
155
-
156
- - name : " Store GitHub token in environment"
157
- run : echo "GH_TOKEN=${{ steps.app-token.outputs.token }}" >> "$GITHUB_ENV"
158
- shell : bash
159
-
160
- - uses : actions/checkout@v4
134
+ - name : " Generate token and checkout repository"
135
+ uses : mongodb-labs/drivers-github-tools/secure-checkout@v2
161
136
with :
137
+ app_id : ${{ vars.APP_ID }}
138
+ private_key : ${{ secrets.APP_PRIVATE_KEY }}
162
139
ref : refs/tags/${{ inputs.version }}
163
- token : ${{ env.GH_TOKEN }}
164
140
165
141
# Sets the S3_ASSETS environment variable used later
166
142
- name : " Set up drivers-github-tools"
0 commit comments