Skip to content

Commit 525e688

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
Use git log as of the body for the GH release.
There is no need to prepend any other info to the release body. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
1 parent d7f4d0c commit 525e688

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,20 @@ jobs:
9090

9191
- name: Generate Changelog
9292
id: changelog
93+
env:
94+
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
9395
run: |
9496
export LATEST_TAG=$(git describe --abbrev=0)
9597
export GIT_LOG=$(git log --pretty=" - %s [%h]" $LATEST_TAG..HEAD | sed 's/ *$//g')
96-
export LATEST_TAG_WITH_LINK=$(echo "[$LATEST_TAG](https://github.com/arduino/arduino-pro-ide/releases/tag/$LATEST_TAG)")
97-
if [ -z "$GIT_LOG" ]; then
98-
export BODY="There were no changes since version $LATEST_TAG_WITH_LINK."
99-
else
100-
export BODY=$(echo -e "Changes since version $LATEST_TAG_WITH_LINK:\n$GIT_LOG")
98+
if [ "$IS_RELEASE" = true ]; then
99+
export BODY=$(echo -e "$GIT_LOG")
100+
else
101+
export LATEST_TAG_WITH_LINK=$(echo "[$LATEST_TAG](https://github.com/arduino/arduino-pro-ide/releases/tag/$LATEST_TAG)")
102+
if [ -z "$GIT_LOG" ]; then
103+
export BODY="There were no changes since version $LATEST_TAG_WITH_LINK."
104+
else
105+
export BODY=$(echo -e "Changes since version $LATEST_TAG_WITH_LINK:\n$GIT_LOG")
106+
fi
101107
fi
102108
echo -e "$BODY"
103109
OUTPUT_SAFE_BODY="${BODY//'%'/'%25'}"

0 commit comments

Comments
 (0)