gitea actions ng24
This commit is contained in:
@@ -191,18 +191,14 @@ jobs:
|
||||
|
||||
- name: ZIP-Datei hochladen
|
||||
run: |
|
||||
RELEASE_ID="${{ steps.create_release.outputs.release_id }}"
|
||||
ZIP_FILE="${{ steps.zip.outputs.zip_file }}"
|
||||
|
||||
API_URL="https://${{ vars.RELEASE_URL }}/api/v1/repos/${PLUGIN_GROUP}/${PLUGIN_NAME}/releases/${RELEASE_ID}/assets?name=${ZIP_FILE}"
|
||||
|
||||
curl -s -X POST "$API_URL" \
|
||||
curl -sf -X POST "$API_URL" \
|
||||
-H "Authorization: token $RELEASE_TOKEN" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary "@repo/${ZIP_FILE}" \
|
||||
--data-binary "@${ZIP_FILE}" \
|
||||
-o upload_response.json
|
||||
|
||||
# Optional: Fehlerprüfung
|
||||
if jq -e '.id' upload_response.json >/dev/null 2>&1; then
|
||||
echo "ZIP erfolgreich hochgeladen."
|
||||
else
|
||||
@@ -210,7 +206,10 @@ jobs:
|
||||
cat upload_response.json
|
||||
exit 1
|
||||
fi
|
||||
|
||||
env:
|
||||
RELEASE_ID: ${{ steps.create_release.outputs.release_id }}
|
||||
ZIP_FILE: ${{ steps.zip.outputs.zip_file }}
|
||||
PLUGIN_NAME: ${{ steps.daten.outputs.name }}
|
||||
PLUGIN_GROUP: ${{ steps.daten.outputs.group }}
|
||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
Reference in New Issue
Block a user