-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.08 KB
/
gitchangelog.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
39
40
41
42
43
44
45
46
47
---
# This workflow automatically updates the CHANGELOG.md file.
name: Git Change Log
on:
push:
branches:
- '*'
- '**'
tags:
- '!*' # This excludes all tags
jobs:
GitChangeLog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python 3
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python Requirements
run: pip install gitchangelog pystache
- name: Update Change Log
run: git pull && make changelog
- name: Configure Git
run: |
git config user.email "[email protected]"
git config user.name "CBDQ Bot Account"
- name: Git Add, Commit & Push
run: |
git status --porcelain
git status --porcelain CHANGELOG.md | grep -q '^.[MADRC]' || exit 0
git add CHANGELOG.md
git commit -m 'chg: dev: Update change log.'
git push
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}