gitea actions ng22
This commit is contained in:
@@ -167,7 +167,7 @@ jobs:
|
|||||||
|
|
||||||
API_RESPONSE=$(curl -s -X POST "$API_URL" \
|
API_RESPONSE=$(curl -s -X POST "$API_URL" \
|
||||||
-H "accept: application/json" \
|
-H "accept: application/json" \
|
||||||
-H "Authorization: token ${{ secrets.RELEASE_TOKEN }}" \
|
-H "Authorization: token $RELEASE_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$JSON")
|
-d "$JSON")
|
||||||
|
|
||||||
@@ -188,3 +188,29 @@ jobs:
|
|||||||
PLUGIN_NAME: ${{ steps.daten.outputs.name }}
|
PLUGIN_NAME: ${{ steps.daten.outputs.name }}
|
||||||
PLUGIN_GROUP: ${{ steps.daten.outputs.group }}
|
PLUGIN_GROUP: ${{ steps.daten.outputs.group }}
|
||||||
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|
||||||
|
- 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" \
|
||||||
|
-H "Authorization: token $RELEASE_TOKEN" \
|
||||||
|
-H "Content-Type: application/zip" \
|
||||||
|
--data-binary "@repo/dist/${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
|
||||||
|
echo "Fehler beim Hochladen der ZIP!"
|
||||||
|
cat upload_response.json
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
PLUGIN_NAME: ${{ steps.daten.outputs.name }}
|
||||||
|
PLUGIN_GROUP: ${{ steps.daten.outputs.group }}
|
||||||
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
Reference in New Issue
Block a user