-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add check for changelog and release note uploader
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# Extract a release note from the given changelog file. | ||
# Note that this script is intended to be run by GitHub Actions. | ||
set -e | ||
|
||
if [ "$1" = "" ]; then | ||
echo "A changelog file path is missing." > /dev/stderr | ||
exit 1 | ||
elif [ "$2" = "" ]; then | ||
echo "An output path is missing." > /dev/stderr | ||
exit 1 | ||
fi | ||
|
||
tag="${GITHUB_REF#refs/*/}" | ||
wget -O /tmp/submark \ | ||
https://github.com/dahlia/submark/releases/download/0.2.0/submark-linux-x86_64 | ||
chmod +x /tmp/submark | ||
/tmp/submark \ | ||
-o "$2" \ | ||
-iO \ | ||
--h2 "Version $tag" \ | ||
"$1" | ||
rm /tmp/submark | ||
|
||
if ! grep -E '\S' "$2" > /dev/null; then | ||
echo "There is no section for the version $tag." > /dev/stderr | ||
exit 1 | ||
elif grep -i "to be released" "$2"; then | ||
echo 'Release date should be shown on the release note.' > /dev/stderr | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: check-changelog | ||
on: | ||
pull_request: | ||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
- development | ||
- 'rc-*' | ||
jobs: | ||
check-changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: tarides/changelog-check-action@v2 | ||
with: | ||
changelog: CHANGES.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters