(hopefully this work) Add: Action for adding release to site

This commit is contained in:
Bella!!! 2025-02-12 06:00:59 +00:00
parent b85758ba88
commit efbeebafcb

21
.github/workflows/add_release_to_site vendored Normal file
View File

@ -0,0 +1,21 @@
name: Notify API on Release
on:
release:
types: [published]
jobs:
notify-api:
runs-on: ubuntu-latest
steps:
- name: Send API Call for New Release
run: |
curl -X POST http://melonx.org/api/new_release \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.MELONX_GITEA_API_KEY }}" \
-d '{
"version_number": "${{ github.event.release.tag_name }}",
"download_link": "${{ github.event.release.html_url }}",
"changelog": "${{ github.event.release.body }}",
"is_latest": true
}'