Compare commits

..

No commits in common. "519a089684836fd3865796bdf4f3ecaa2e75d1cb" and "875d9d2b703cfad8a4108e4c03bdc87a83c9caa1" have entirely different histories.

3 changed files with 7 additions and 34 deletions

View File

@ -75,8 +75,6 @@ jobs:
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_API_URL: ${{ secrets.GITEA_API_URL }} GITEA_API_URL: ${{ secrets.GITEA_API_URL }}
GITEA_REPO: ${{ secrets.GITEA_REPO }}
GITEA_OWNER: ${{ secrets.GITEA_OWNER }}
run: | run: |
VERSION=${{ steps.get_version.outputs.VERSION }} VERSION=${{ steps.get_version.outputs.VERSION }}
cd .pio/build/esp32dev cd .pio/build/esp32dev
@ -103,38 +101,21 @@ jobs:
\"body\": \"${{ steps.changelog.outputs.CHANGES }}\" \"body\": \"${{ steps.changelog.outputs.CHANGES }}\"
}" }"
# Create release and capture HTTP status # Create release
RESPONSE=$(curl -s -w "%{http_code}" -X POST \ RESPONSE=$(curl -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "$RELEASE_DATA" \ -d "$RELEASE_DATA" \
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases") "${GITEA_API_URL}/repos/owner/repo/releases")
HTTP_STATUS=${RESPONSE: -3}
RESPONSE_BODY=${RESPONSE:0:-3}
if [ "$HTTP_STATUS" != "201" ]; then
echo "Fehler beim Erstellen des Releases: $RESPONSE_BODY"
exit 1
fi
# Extract release ID from response
RELEASE_ID=$(echo "$RESPONSE_BODY" | jq -r .id)
# Upload assets # Upload assets
RELEASE_ID=$(echo $RESPONSE | jq -r .id)
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
if [ -f "$file" ]; then if [ -f "$file" ]; then
echo "Uploading $file..." curl -X POST \
UPLOAD_RESPONSE=$(curl -s -w "%{http_code}" -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \ -H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \ -H "Content-Type: application/octet-stream" \
--data-binary @"$file" \ --data-binary @"$file" \
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=${file}") "${GITEA_API_URL}/repos/owner/repo/releases/${RELEASE_ID}/assets?name=${file}"
UPLOAD_STATUS=${UPLOAD_RESPONSE: -3}
if [ "$UPLOAD_STATUS" != "201" ]; then
echo "Fehler beim Upload von $file"
exit 1
fi
fi fi
done done

View File

@ -1,13 +1,5 @@
# Changelog # Changelog
## [1.3.22] - 2025-02-21
### Added
- workflow: improve Gitea release process with additional environment variables and error handling
### Changed
- update webpages for version v1.3.22
## [1.3.21] - 2025-02-21 ## [1.3.21] - 2025-02-21
### Changed ### Changed
- update webpages for version v1.3.21 - update webpages for version v1.3.21

View File

@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
[common] [common]
version = "1.3.22" version = "1.3.21"
#test #test