File tree 1 file changed +17
-5
lines changed
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,28 @@ jobs:
14
14
fetch-tags : true
15
15
fetch-depth : 0
16
16
repository : " Govcraft/rust-docs-mcp-server"
17
- - run : |
17
+ - name : Generate and Commit Changelog
18
+ run : |
19
+ # Download and extract git-chglog
18
20
wget https://github.com/git-chglog/git-chglog/releases/download/v0.15.4/git-chglog_0.15.4_linux_amd64.tar.gz
19
21
tar -xvzf git-chglog_0.15.4_linux_amd64.tar.gz
22
+
23
+ # Generate changelog
20
24
./git-chglog -o ./CHANGELOG.md
25
+
26
+ # Clean up downloaded files
21
27
rm git-chglog_0.15.4_linux_amd64.tar.gz
22
28
rm git-chglog
29
+
30
+ # Configure git user
23
31
git config user.name "github-actions[bot]"
24
32
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
33
+
34
+ # Checkout main branch
35
+ git checkout main
36
+
37
+ # Add, commit, and push the changelog to main
25
38
git add ./CHANGELOG.md
26
- git commit -m "chore(docs): update CHANGELOG for latest tag"
27
- git push origin HEAD:$REF
28
- env:
29
- REF: "refs/deploy-bot/${{ github.run_id }}/merge"
39
+ # Use --allow-empty in case the changelog hasn't changed (e.g., rerunning on same tag)
40
+ git commit --allow-empty -m "chore(docs): update CHANGELOG for latest tag [skip ci]"
41
+ git push origin main
You can’t perform that action at this time.
0 commit comments