Merge pull request #114 from Holzhaus/dependabot/github_actions/peace… #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Changelog | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docs: | |
name: Update Changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check out repository" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Use cached artifacts" | |
uses: Swatinem/rust-cache@v2 | |
- name: "Print Rust version" | |
run: rustc -vV | |
- name: "Install git-cliff" | |
run: cargo install --version 0.9.2 git-cliff | |
- name: "Generate Changelog" | |
run: git-cliff --output CHANGELOG.md | |
- name: "Check if changes any changes were made" | |
run: echo "GIT_DIRTY=$(git diff --quiet ; printf "%d" "$?")" >> "${GITHUB_ENV}" | |
- name: "Commit new changelog" | |
uses: EndBug/add-and-commit@v9 | |
if: env.GIT_DIRTY != null && env.GIT_DIRTY != '0' | |
with: | |
add: "CHANGELOG.md" | |
message: "chore(changelog): Update changelog after merge" |