File tree Expand file tree Collapse file tree 1 file changed +20
-11
lines changed
Expand file tree Collapse file tree 1 file changed +20
-11
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,29 @@ jobs:
4343 - name : Extract release data
4444 id : release
4545 run : |
46- echo "title=$(echo "${{ github.event.release.name }}" | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT
47- echo "body=$(echo "${{ github.event.release.body }}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/"/\\"/g')" >> $GITHUB_OUTPUT
46+ echo "title=${{ github.event.release.name }}" >> $GITHUB_OUTPUT
47+ echo "body<<EOF" >> $GITHUB_OUTPUT
48+ echo "${{ github.event.release.body }}" >> $GITHUB_OUTPUT
49+ echo "EOF" >> $GITHUB_OUTPUT
50+
51+ - name : Install jq
52+ run : sudo apt-get update && sudo apt-get install -y jq
4853
4954 - name : Publish changelog to Readme
5055 env :
5156 README_API_KEY : ${{ secrets.README_API_KEY }}
5257 run : |
58+ jq -n --arg title "Python Unified SDK ${{ steps.release.outputs.title }}" \
59+ --arg body "${{ steps.release.outputs.body }}" \
60+ '{
61+ author: { id: $authorId },
62+ title: $title,
63+ body: $body,
64+ privacy: { view: "public" }
65+ }' > payload.json
66+
5367 curl --location 'https://api.readme.com/v2/changelogs' \
54- --header "Authorization: Bearer $README_API_KEY" \
55- --header 'Content-Type: application/json' \
56- --data '{
57- "body": "${{ steps.release.outputs.body }}",
58- "title": "Python Unified SDK ${{ steps.release.outputs.title }}",
59- "privacy": {
60- "view": "public"
61- }
62- }'
68+ --header "Authorization: Bearer $README_API_KEY" \
69+ --header 'Content-Type: application/json' \
70+ --data @payload.json
71+
You can’t perform that action at this time.
0 commit comments