Skip to content

Commit fab7fb9

Browse files
Make changelog file name variable
1 parent f01f2ca commit fab7fb9

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

release/action.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ inputs:
2020
description: 'Command to build from root of library directory.'
2121
required: false
2222
default: 'rm -rf ../build && cmake -S . -B ../build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release && make -C ../build all'
23+
changelog_file:
24+
description: 'File name containing the change-log.'
25+
required: false
26+
default: 'CHANGELOG.md'
2327

2428
runs:
2529
using: 'composite'
@@ -71,15 +75,16 @@ runs:
7175
shell: bash
7276
env:
7377
VERSION_NUMBER: ${{ inputs.version_number }}
78+
CHANGELOG_FILE: ${{ inputs.changelog_file }}
7479
working-directory: ${{ github.event.repository.name }}-repository
7580
run: |
76-
if [ ! -f "CHANGELOG.md" ]; then
77-
echo "Error: CHANGELOG.md not found"
81+
if [ ! -f "$CHANGELOG_FILE" ]; then
82+
echo "Error: $CHANGELOG_FILE not found"
7883
exit 1
7984
fi
8085
81-
if ! grep -q "^## $VERSION_NUMBER" CHANGELOG.md; then
82-
echo "Error: CHANGELOG.md does not contain release version $VERSION_NUMBER"
86+
if ! grep -q "^## $VERSION_NUMBER" $CHANGELOG_FILE; then
87+
echo "Error: $CHANGELOG_FILE does not contain release version $VERSION_NUMBER"
8388
exit 1
8489
fi
8590

0 commit comments

Comments
 (0)