File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,13 @@ jobs:
80
80
81
81
# ############ Release with workflow_dispatch #############
82
82
83
- - name : Read Changelog
84
- id : changelog
83
+ - name : Read and Escape Changelog
85
84
run : |
86
- echo "CHANGELOG=$(cat changelog_new.txt)" >> $GITHUB_ENV
85
+ # Check if the changelog file exists
86
+ if [ -f changelog_new.txt ]; then
87
+ # Read the file and escape necessary characters
88
+ ESCAPED_CHANGELOG=$(cat changelog_new.txt | sed 's/"/\\"/g' | sed "s/'/\\'/g" | awk '{printf "%s\\n", $0}')
89
+ echo "ESCAPED_CHANGELOG=$ESCAPED_CHANGELOG" >> $GITHUB_ENV
87
90
88
91
- name : Zip Linux Build for Release
89
92
if : github.event_name == 'workflow_dispatch'
@@ -106,7 +109,7 @@ jobs:
106
109
with :
107
110
tag_name : ${{ steps.version_info.outputs.FULL_VERSION }}
108
111
release_name : ${{ steps.version_info.outputs.FULL_VERSION }}
109
- body : ${{ env.CHANGELOG }}
112
+ body : ${{ env.ESCAPED_CHANGELOG }}
110
113
draft : false
111
114
prerelease : false
112
115
You can’t perform that action at this time.
0 commit comments