-
Notifications
You must be signed in to change notification settings - Fork 13
38 lines (30 loc) · 951 Bytes
/
changelog.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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"