Skip to content

Commit 6f3e555

Browse files
committed
Update ChangelogUpdate.yml
1 parent 7bf1a54 commit 6f3e555

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/ChangelogUpdate.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
name: Automated Changelog Update
24

35
on:
@@ -23,16 +25,29 @@ jobs:
2325
- name: Fetch tags
2426
run: git fetch --tags
2527

28+
- name: Check if release.yml exists
29+
run: test -f .github/release.yml || (echo "release.yml not found" && exit 1)
30+
2631
- name: Get changelog
2732
id: changelog
2833
run: |
2934
TAG=$(git describe --tags --abbrev=0)
3035
GIT_LOG=$(git log $TAG..HEAD --pretty=format:"%H %s [%an]")
3136
CHANGELOG=""
3237
38+
# Check if yq can parse the file
39+
if ! yq eval '.' .github/release.yml > /dev/null 2>&1; then
40+
echo "Error parsing release.yml"
41+
exit 1
42+
fi
43+
3344
# Read release.yml for categories
3445
CATEGORIES=$(yq eval '.changelog.categories' .github/release.yml)
3546
47+
TAG=$(git describe --tags --abbrev=0)
48+
GIT_LOG=$(git log $TAG..HEAD --pretty=format:"%H %s [%an]")
49+
CHANGELOG=""
50+
3651
# Iterate over categories
3752
for i in $(seq 0 $(echo "$CATEGORIES" | yq eval 'length' -)); do
3853
TITLE=$(echo "$CATEGORIES" | yq eval ".[$i].title" -)

0 commit comments

Comments
 (0)