Skip to content

Commit

Permalink
feat: add support for adding major release description to the release…
Browse files Browse the repository at this point in the history
… notes
  • Loading branch information
jackton1 committed Sep 22, 2022
1 parent 4c4bb2a commit 0666592
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,17 @@ git fetch "$INPUTS_REMOTE" +refs/tags/*:refs/tags/*
NEW_TAG=${GITHUB_REF/refs\/tags\//}
MAJOR_VERSION=$(echo "$NEW_TAG" | cut -d. -f1)

if git tag -l "$MAJOR_VERSION"; then
echo "Adding $MAJOR_VERSION to release notes..."
{
echo "# Changes in $MAJOR_VERSION"
gh release view "$MAJOR_VERSION" --json body --jq '.body'
printf "\n---\n\n"
} >> "$INPUTS_RELEASE_NOTES_FILE"
fi

for tag in $(git tag -l "$MAJOR_VERSION.*"); do
echo "Adding $tag to release notes"
echo "Adding $tag to release notes..."
{
echo "# Changes in $tag"
gh release view "$tag" --json body --jq '.body'
Expand Down

0 comments on commit 0666592

Please sign in to comment.