File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -202,20 +202,23 @@ jobs:
202
202
run : |
203
203
# github api url
204
204
url=https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ steps.generate_release_notes.outputs.id }}
205
+ echo "url: $url"
205
206
206
207
# get release notes
207
- body =$(
208
+ release =$(
208
209
curl \
209
210
-s \
210
211
-L \
211
212
-H "Accept: application/vnd.github+json" \
212
213
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
213
214
-H "X-GitHub-Api-Version: 2022-11-28" \
214
- $url \
215
- | jq -r .body
215
+ $url
216
216
)
217
+ tag_name=$(jq -r .tag_name <<< "$release")
218
+ target_commitish=$(jq -r .target_commitish <<< "$release")
219
+ body=$(jq -r .body <<< "$release")
217
220
218
- echo -e ">>>\n$body\n<<< "
221
+ echo "tag_name: $tag_name target_commitish: $target_commitish "
219
222
220
223
# append virustotal details to release notes
221
224
nl=$'\n'
@@ -226,17 +229,19 @@ jobs:
226
229
body+="* [$name]($vturl)$nl"
227
230
done <<< "${{ steps.virustotal.outputs.analysis }}"
228
231
229
- # update release notes
230
- export body
231
- echo -e ">>>\n$body\n<<<"
232
+ echo -e "body:\n$body"
232
233
234
+ # update release notes
235
+ export tag_name target_commitish body
233
236
curl \
234
237
-s \
235
238
-L \
236
239
-X PATCH \
237
240
-H "Accept: application/vnd.github+json" \
238
241
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
239
242
-H "X-GitHub-Api-Version: 2022-11-28" \
243
+ --variable '%tag_name' \
244
+ --varable '%target_commitish' \
240
245
--variable '%body' \
241
- --expand-data '{"body": "{{body:trim:json}}"}' \
246
+ --expand-data '{"tag_name": "{{tag_name:json}}", " body": "{{body:trim:json}}"}' \
242
247
$url
You can’t perform that action at this time.
0 commit comments