Skip to content

Commit

Permalink
fix: decode changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bndynet committed Aug 19, 2023
1 parent 7f9ccfc commit 01d76b8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ jobs:
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Decode changelog
uses: actions/github-script@v6
id: decode-changelog
with:
result-encoding: string
script: |
const encodedChangelog = '${{ needs.check-version.outputs.NEXT_RELEASE_CHANGELOG }}'
return encodedChangelog..replaceAll('%0A', '\\n').replaceAll('%0D', '\\r').replaceAll('%25', '%')
- name: Send notification
uses: bndynet/github-action-webex@v1
Expand All @@ -83,7 +92,8 @@ jobs:
token: ${{ secrets.WX_TOKEN }}
server: ${{ secrets.WX_SERVER }}
room-id: ${{ secrets.WX_ROOMID }}
message: "${{ github.repository }} v${{ needs.check-version.outputs.NEXT_RELEASE_VERSION }} has been released"
message: "${{ steps.decode-changelog.outputs.result }}"
# message: "${{ github.repository }} v${{ needs.check-version.outputs.NEXT_RELEASE_VERSION }} has been released"

- run: |
echo "${{ needs.check-version.outputs.NEXT_RELEASE_CHANGELOG }}" >> $GITHUB_STEP_SUMMARY
echo "${{ steps.decode-changelog.outputs.result }}" >> $GITHUB_STEP_SUMMARY

0 comments on commit 01d76b8

Please sign in to comment.