File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+
2+
13name : Automated Changelog Update
24
35on :
@@ -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" -)
You can’t perform that action at this time.
0 commit comments