Compare commits

...

3 Commits

Author SHA1 Message Date
31ef3ac8df docs: update changelog for version 1.3.29
All checks were successful
Release Workflow / detect-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Successful in 2m45s
2025-02-21 23:44:36 +01:00
8cf3f87c89 docs: update webpages for version v1.3.29 2025-02-21 23:44:35 +01:00
c446188311 workflow: update Gitea release workflow to create release before file uploads 2025-02-21 23:44:30 +01:00
3 changed files with 44 additions and 39 deletions

View File

@ -120,47 +120,46 @@ jobs:
echo "Debug: API URL: ${GITEA_API_URL}"
echo "Debug: Repository: ${GITEA_OWNER}/${GITEA_REPO}"
# Prepare files for upload
FILES=""
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
if [ -f "$file" ]; then
FILES="$FILES -F \"attach[]=@$file\""
echo "Debug: Found file: $file"
fi
done
# Test API connection with explicit token header
echo "Debug: Testing API connection..."
TEST_RESPONSE=$(curl -s -w "\n%{http_code}" \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_API_URL}/api/v1/version")
TEST_STATUS=$(echo "$TEST_RESPONSE" | tail -n1)
if [ "$TEST_STATUS" != "200" ]; then
echo "Error: Cannot connect to Gitea API"
echo "Response: $TEST_RESPONSE"
exit 1
fi
# Create release using API
# Erstelle zuerst den Release ohne Dateien
echo "Debug: Creating release..."
RELEASE_DATA="{\"tag_name\":\"v${VERSION}\",\"name\":\"v${VERSION}\",\"body\":\"${{ steps.changelog.outputs.CHANGES }}\"}"
# Create release with explicit token header and file uploads
CURL_CMD="curl -s -w \"\n%{http_code}\" \
RELEASE_RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST \
-H \"Authorization: token ${GITEA_TOKEN}\" \
-H \"Content-Type: application/json\" \
-d '${RELEASE_DATA}' \
${FILES} \
\"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases\""
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "${RELEASE_DATA}" \
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
RESPONSE=$(eval $CURL_CMD)
RELEASE_STATUS=$(echo "$RELEASE_RESPONSE" | tail -n1)
RELEASE_BODY=$(echo "$RELEASE_RESPONSE" | head -n -1)
HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
echo "Debug: HTTP Status: $HTTP_STATUS"
if [ "$HTTP_STATUS" != "201" ]; then
if [ "$RELEASE_STATUS" != "201" ]; then
echo "Error: Failed to create release"
echo "Response: $RESPONSE_BODY"
echo "Response: $RELEASE_BODY"
exit 1
fi
# Extrahiere die Release-ID aus der Antwort
RELEASE_ID=$(echo "$RELEASE_BODY" | grep -o '"id":[0-9]*' | cut -d':' -f2)
# Lade die Dateien einzeln hoch
for file in upgrade_filaman_firmware_v${VERSION}.bin upgrade_filaman_website_v${VERSION}.bin filaman_full_${VERSION}.bin; do
if [ -f "$file" ]; then
echo "Debug: Uploading $file..."
UPLOAD_RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases/${RELEASE_ID}/assets?name=${file}")
UPLOAD_STATUS=$(echo "$UPLOAD_RESPONSE" | tail -n1)
if [ "$UPLOAD_STATUS" != "201" ]; then
echo "Warning: Failed to upload $file"
echo "Response: $(echo "$UPLOAD_RESPONSE" | head -n -1)"
else
echo "Successfully uploaded $file"
fi
fi
done

View File

@ -1,5 +1,11 @@
# Changelog
## [1.3.29] - 2025-02-21
### Changed
- update webpages for version v1.3.29
- workflow: update Gitea release workflow to create release before file uploads
## [1.3.28] - 2025-02-21
### Changed
- update webpages for version v1.3.28

View File

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