Skip to content

Commit

Permalink
Fix release workflow not generating changelog properly
Browse files Browse the repository at this point in the history
  • Loading branch information
r4g3baby committed Oct 12, 2023
1 parent d8b5085 commit 183b0b4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ jobs:
run: |
git fetch --unshallow --tags
tag=$(git tag --sort version:refname | tail -n 2 | head -n 1)
if [ "$tag" ]; then
changelog=$(git log --oneline --no-decorate $tag..HEAD)
else
changelog=$(git log --oneline --no-decorate)
fi
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A' - }"
changelog=" - ${changelog//$'\r'/'%0D'}"
echo "CHANGELOG<<$EOF" >> "$GITHUB_OUTPUT"
echo "$changelog" >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
changelog=$(git log $tag..HEAD --pretty=format:'- %h %s%n' --reverse)
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "CHANGELOG<<$EOF" >> $GITHUB_OUTPUT
echo "$changelog" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
- name: Create Draft Release
uses: softprops/action-gh-release@v1
Expand Down

0 comments on commit 183b0b4

Please sign in to comment.