@@ -113,8 +113,8 @@ jobs:
113
113
asset_name : ${{ matrix.cls }}.cls
114
114
tag : ${{ github.ref }}
115
115
116
- update_changelog :
117
- name : Generate changelog
116
+ release_notes :
117
+ name : Populate release notes with latest changelog
118
118
runs-on : ubuntu-latest
119
119
# Makesure it's the last job.
120
120
needs : [build, publish_cls, publish_templates]
@@ -189,7 +189,7 @@ jobs:
189
189
to [CTAN](https://www.ctan.org/pkg/bithesis)." >> "$GITHUB_STEP_SUMMARY"
190
190
191
191
changelog :
192
- name : Update changelog
192
+ name : Update CHANGELOG
193
193
runs-on : ubuntu-latest
194
194
if : ${{ ! github.event.release.prerelease }}
195
195
steps :
@@ -199,7 +199,7 @@ jobs:
199
199
fetch-depth : 0
200
200
ref : ${{ github.event.repository.default_branch }}
201
201
202
- - name : Generate a changelog
202
+ - name : Update CHANGELOG
203
203
uses : orhun/git-cliff-action@v3
204
204
with :
205
205
config : cliff.toml
@@ -208,11 +208,20 @@ jobs:
208
208
OUTPUT : CHANGELOG.md
209
209
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
210
210
211
- - name : Commit
211
+ - name : Create a PR
212
+ # Changes must be made through the merge queue, therefore a PR is necessary.
213
+ id : pr
214
+ uses : peter-evans/create-pull-request@v6
215
+ with :
216
+ commit-message : Update CHANGELOG for ${{ github.event.release.tag_name }}
217
+ title : Update CHANGELOG for ${{ github.event.release.tag_name }}
218
+
219
+ - name : Report status
212
220
run : |
213
- git config user.name 'github-actions[bot]'
214
- git config user.email 'github-actions[bot]@users.noreply.github.com'
215
- set +e
216
- git add CHANGELOG.md
217
- git commit -m "Update changelog"
218
- git push https://${{ secrets.GITHUB_TOKEN }}@github.com/BITNP/BIThesis.git ${{ github.event.repository.default_branch }}
221
+ echo "[Pull request #${{ steps.pr.outputs.pull-request-number }}](${{ steps.pr.outputs.pull-request-url }}) is created to update CHANGELOG." >> "$GITHUB_STEP_SUMMARY"
222
+
223
+ - name : Merge the PR
224
+ run : |
225
+ gh pr merge ${{ steps.pr.outputs.pull-request-number }}
226
+ env :
227
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments