Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nowscott committed Jul 19, 2024
1 parent a807eb4 commit 288bd09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ jobs:
git fetch --tags
# 获取提交信息并格式化
RELEASE_NOTES=$(git log ${{ env.PREVIOUS_TAG }}..HEAD --pretty=format:"* %s by @%an in %h" --abbrev-commit)
# 处理日志换行符
# 处理日志换行符和百分号
RELEASE_NOTES=$(echo "$RELEASE_NOTES" | sed ':a;N;$!ba;s/\n/%0A/g' | sed 's/%/%25/g')
# 恢复换行符
RELEASE_NOTES=$(echo "$RELEASE_NOTES" | sed 's/%0A/\n/g' | sed 's/%25/%/g')
echo "RELEASE_NOTES=$RELEASE_NOTES" >> $GITHUB_ENV
- name: Generate Full Changelog
Expand Down Expand Up @@ -89,7 +91,7 @@ jobs:
uses: actions/create-release@v1
with:
tag_name: v${{ env.PACKAGE_VERSION }}
release_name: Release ${{ env.PACKAGE_VERSION }}
release_name: v${{ env.PACKAGE_VERSION }}
body: |
## What's Changed
${{ env.RELEASE_NOTES }}
Expand Down

0 comments on commit 288bd09

Please sign in to comment.