Skip to content
name: Update changelog on release published
on:
release:
types: [published]
workflow_dispatch:
jobs:
changelog:
name: Update changelog
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.REPO_TOKEN }}
- name: Update changelog from release
uses: rhysd/changelog-from-release/action@v3
with:
file: CHANGELOG.md
github_token: ${{ secrets.REPO_TOKEN }}
commit_summary_template: "chore: update changelog for %s"
header: |
<style>
h1:first-of-type {
display: none;
}
.my-5 {
margin: unset !important;
}
.markdown-body img {
max-width: 50%;
}
@media (prefers-color-scheme: dark) {
body {
color-scheme: dark;
color: white;
background: transparent;
}
a, :link {
color: #419cff;
}
a:active, link:active {
color: #ff1919;
}
}
</style>
- name: Set file permissions
run: sudo chown -R $(whoami) .
- name: Commit changes
run: |
git config --global user.name "ejbills"
git config --global user.email "[email protected]"
git add CHANGELOG.md
git commit -m "chore: update changelog for ${{ github.event.release.tag_name }}" || echo "No changes to commit"
- name: Push changes
run: |
git push origin HEAD:main || echo "No changes to push"