Skip to content

Commit 1f18e08

Browse files
authored
Update publish_alpha.yml
1 parent 044b24f commit 1f18e08

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

.github/workflows/publish_alpha.yml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -233,42 +233,43 @@ jobs:
233233
"title": "New Alpha-Build dropped",
234234
"color": $embed_color,
235235
"fields": [
236-
{
237-
"name": "Commits:",
238-
"value": $field_value,
239-
"inline": true
240-
},
241-
{
242-
"name": "Developers:",
243-
"value": $author_value,
244-
"inline": false
245-
}
246-
],
247-
"footer": {
248-
"text": $footer_text
249-
},
250-
"timestamp": $timestamp,
251-
"thumbnail": {
252-
"url": $thumbnail_url
236+
{
237+
"name": "Commits:",
238+
"value": $field_value,
239+
"inline": false
240+
},
241+
{
242+
"name": "Developers:",
243+
"value": $author_value,
244+
"inline": false
245+
}
246+
],
247+
"footer": {
248+
"text": $footer_text
249+
},
250+
"timestamp": $timestamp,
251+
"thumbnail": {
252+
"url": $thumbnail_url
253253
}
254254
}
255-
],
256-
"attachments": []
255+
]
257256
}')
258257
259258
echo "Debug: Final Discord payload:"
260259
echo "$discord_data"
261260
262261
curl -H "Content-Type: application/json" \
262+
-H "User-Agent: GitHub-Action-Script" \
263+
-X POST \
263264
-d "$discord_data" \
264-
${{ secrets.DISCORD_WEBHOOK_URL }}
265+
"${{ secrets.DISCORD_WEBHOOK_URL }}" || echo "Failed to send embed message"
265266
266267
if [ "$SKIP_BUILD" != "true" ]; then
267-
curl -F "payload_json=${contentbody}" \
268-
-F "Awery_debug=@app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk" \
269-
${{ secrets.DISCORD_WEBHOOK_URL }}
268+
curl -H "User-Agent: GitHub-Action-Script" \
269+
-F "file=@app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk" \
270+
"${{ secrets.DISCORD_WEBHOOK_URL }}" || echo "Failed to send APK file"
270271
else
271-
echo "Skipping APK upload to Discord due to SKIP_BUILD being set to true"
272+
echo "Skipping APK upload to Discord due to SKIP_BUILD being set to true"
272273
fi
273274
274275
COMMIT_LOG=$(cat commit_log.txt)

0 commit comments

Comments
 (0)