From 2755e9c8639e73635b536405398c9397050dd3fa Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Wed, 19 Feb 2025 14:11:44 +0100 Subject: [PATCH] feat: update Gitea release workflow to use dynamic upload URL and increment version to 1.2.45 --- .github/workflows/providers/gitea-release.yml | 5 +++-- platformio.ini | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/providers/gitea-release.yml b/.github/workflows/providers/gitea-release.yml index a05e957..f839407 100644 --- a/.github/workflows/providers/gitea-release.yml +++ b/.github/workflows/providers/gitea-release.yml @@ -95,8 +95,9 @@ jobs: "${API_URL}/repos/${REPO}/releases") RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | cut -d':' -f2 | head -n1) + UPLOAD_URL=$(echo "$RESPONSE" | grep -o '"upload_url":"[^"]*' | cut -d':' -f2- | tr -d '"') - if [ -n "$RELEASE_ID"; then + if [ -n "$RELEASE_ID" ]; then echo "Release created with ID: $RELEASE_ID" # Upload files @@ -107,7 +108,7 @@ jobs: -H "Authorization: token ${TOKEN}" \ -H "Content-Type: application/octet-stream" \ --data-binary "@.pio/build/esp32dev/$file" \ - "${API_URL}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=$file" + "${UPLOAD_URL}?name=$file" done else echo "Failed to create release. Response:" diff --git a/platformio.ini b/platformio.ini index d79f19f..082e3eb 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [common] -version = "1.2.44" +version = "1.2.45" [env:esp32dev] platform = espressif32