Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
- This is test relaase
- NOT REAL PRODUCTION READY RELEASE
  • Loading branch information
soymadip authored Oct 17, 2024
1 parent 7a6a5f8 commit d13d998
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,22 @@ jobs:
- name: Generate changelog from commits
id: generate_changelog
run: |
CHANGELOG=$(git log -1 --pretty=%B | tr -d '\n' | sed 's/"/\\"/g')
COMMIT_SUMMARY=$(git log -1 --pretty=%s)
COMMIT_DESCRIPTION=$(git log -1 --pretty=%b | sed ':a;N;$!ba;s/\n/\\n/g')
if [[ -z "$COMMIT_DESCRIPTION" ]]; then
CHANGELOG="$COMMIT_SUMMARY"
else
CHANGELOG="$COMMIT_SUMMARY\\n\\n$COMMIT_DESCRIPTION"
fi
if [[ -z "$CHANGELOG" ]]; then
CHANGELOG="Release version ${{ env.VERSION }}"
fi
echo "CHANGELOG=${CHANGELOG}" >> $GITHUB_ENV
- name: Update release with changelog
run: |
gh release edit ${{ env.VERSION }} --notes "${{ env.CHANGELOG }}"
Expand Down

0 comments on commit d13d998

Please sign in to comment.