File tree 1 file changed +13
-2
lines changed 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,24 @@ jobs:
106
106
console.log(`releaseNotes (modified): ${JSON.stringify(modifiedBody, null, 2)}`);
107
107
core.setOutput("release_body", modifiedBody);
108
108
109
- - name : Write release notes to file
109
+ - name : Prepare Release Title
110
+ id : title
111
+ env :
112
+ # "vX.Y.Z Release Title"
113
+ RAW_TITLE : ${{ steps.calculate-version.outputs.new_version }} ${{ github.event.inputs.release_title }}
114
+ run : |
115
+ # Print RAW_TITLE safely, then escape double quotes
116
+ SANITIZED_TITLE="$(printf '%s' "$RAW_TITLE" | sed 's/"/\\"/g')"
117
+ echo "sanitized_title=$SANITIZED_TITLE" >> "$GITHUB_OUTPUT"
118
+
119
+ - name : Write Release Notes to File
110
120
run : |
111
121
echo "${{ steps.generate-release-notes.outputs.release_body }}" > release-notes.txt
122
+
112
123
- name : Create Draft Release
113
124
run : |
114
125
gh release create "${{ steps.calculate-version.outputs.new_version }}" \
115
- --title "${{ steps.calculate-version .outputs.new_version }} ${{ github.event.inputs.release_title }}" \
126
+ --title "${{ steps.title .outputs.sanitized_title }}" \
116
127
--notes-file release-notes.txt \
117
128
--draft \
118
129
--repo "${{ github.repository }}"
You can’t perform that action at this time.
0 commit comments