File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4343 VERSION="$(cat Version.txt)"
4444 echo "VERSION=$VERSION" >> $GITHUB_ENV
4545
46+ - name : Update changelog.md
47+ run : |
48+ NEW_CHANGELOG="## Version v${{ env.VERSION }}\n\n${{ steps.changelog.outputs.content }}\n"
49+
50+ # Insert new changelog before the first release section
51+ awk '/^## Release /{print NEW_CHANGELOG; NEW_CHANGELOG="";} 1' NEW_CHANGELOG="$NEW_CHANGELOG" changelog.md > temp && mv temp changelog.md
52+
53+ - name : Commit and push changelog
54+ run : |
55+ git config user.name "github-actions[bot]"
56+ git config user.email "github-actions[bot]@users.noreply.github.com"
57+ git add changelog.md Version.txt
58+ git commit -m "Update changelog and bump version to v${{ env.VERSION }}"
59+ git push origin main
60+
4661 - name : Get commit message
4762 id : message
4863 run : |
7792 uses : peter-evans/create-pull-request@v6
7893 with :
7994 base : main
80- add-paths : Version.txt
95+ add-paths : Version.txt changelog.md
8196 reviewers : mbudiu-vmw
8297 commit-message : ${{ steps.message.outputs.content }}
8398 signoff : false
You can’t perform that action at this time.
0 commit comments