5757 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5858 run : |
5959 gh release create $TAG_NAME --generate-notes
60-
61- - name : Discord notification
62- shell : bash
63- run : |
64- BODY=$(jq -nc \
65- --arg title "WaspLib Plugins Version $TAG_NAME" \
66- --arg desc "${{ github.event.workflow_run.head_commit.message }}\n\nDownload: https://github.com/WaspScripts/wasp-plugins/releases/tag/$TAG_NAME" \
67- --arg url "https://github.com/WaspScripts/wasp-plugins/commit/${{ github.event.workflow_run.head_commit.id }}" \
68- --arg foot "Author: ${{ github.event.head_commit.author.name }}" \
69- --argjson color 16742912 \
70- '{embeds:[{title:$title,description:$desc,url:$url,color:$color,footer:{text:$foot}}]}')
71- curl \
72- -H "Content-Type: application/json" \
73- -d "$BODY" \
74- ${{ secrets.UPDATES_WEBHOOK }}
7560
7661 - name : Create Uploaded Release
7762 run : |
9176 curl -X PUT "$SUPABASE_URL/storage/v1/object/plugins/latest.zip" \
9277 -H "Authorization: Bearer $SUPABASE_KEY" \
9378 -H "Content-Type: application/zip" \
94- --data-binary @"$ZIP_NAME"
79+ --data-binary @"$ZIP_NAME"
80+
81+ - name : Insert release metadata
82+ env :
83+ SUPABASE_URL : ${{ secrets.SUPABASE_URL }}
84+ SUPABASE_KEY : ${{ secrets.SUPABASE_ANON_KEY }}
85+ run : |
86+ DATA=$(jq -nc --arg version "$TAG_NAME" '{version:$version}')
87+ curl -X POST "$SUPABASE_URL/rest/v1/plugins" \
88+ -H "apikey: $SUPABASE_KEY" \
89+ -H "Authorization: Bearer $SUPABASE_KEY" \
90+ -H "Content-Type: application/json" \
91+ -H "Content-Profile: scripts" \
92+ -d "$DATA"
93+
94+ - name : Discord notification
95+ shell : bash
96+ run : |
97+ BODY=$(jq -nc \
98+ --arg title "WaspLib Plugins Version $TAG_NAME" \
99+ --arg desc "${{ github.event.workflow_run.head_commit.message }}\n\nDownload: https://github.com/WaspScripts/wasp-plugins/releases/tag/$TAG_NAME" \
100+ --arg url "https://github.com/WaspScripts/wasp-plugins/commit/${{ github.event.workflow_run.head_commit.id }}" \
101+ --arg foot "Author: ${{ github.event.head_commit.author.name }}" \
102+ --argjson color 16742912 \
103+ '{embeds:[{title:$title,description:$desc,url:$url,color:$color,footer:{text:$foot}}]}')
104+ curl \
105+ -H "Content-Type: application/json" \
106+ -d "$BODY" \
107+ ${{ secrets.UPDATES_WEBHOOK }}
0 commit comments