Compare commits

..

6 Commits

Author SHA1 Message Date
7cf113eaff docs: update changelog for version 1.3.23
Some checks failed
Release Workflow / detect-provider (push) Successful in 3s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Failing after 2m57s
2025-02-21 22:48:04 +01:00
44d27adab2 docs: update webpages for version v1.3.23 2025-02-21 22:48:04 +01:00
e0a2dff5fe workflow: enhance Gitea release process with debug outputs and API connection checks 2025-02-21 22:47:30 +01:00
519a089684 docs: update changelog for version 1.3.22
Some checks failed
Release Workflow / detect-provider (push) Successful in 2s
Release Workflow / github-release (push) Has been skipped
Release Workflow / gitea-release (push) Failing after 2m27s
2025-02-21 22:39:28 +01:00
ef053bb2b6 docs: update webpages for version v1.3.22 2025-02-21 22:39:28 +01:00
0a91c7b269 workflow: improve Gitea release process with additional environment variables and error handling 2025-02-21 22:39:24 +01:00
3 changed files with 51 additions and 16 deletions

View File

@ -75,47 +75,66 @@ 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
# Debug-Ausgaben
echo "Debug: Checking API URL..."
echo "GITEA_API_URL=${GITEA_API_URL}"
# Prepare files for upload # Prepare files for upload
FILES="" FILES=""
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
FILES="$FILES -a $file" FILES="$FILES -a $file"
echo "Debug: Found file: $file"
fi fi
done done
# Check if tag exists # Check if tag exists
if ! git rev-parse "v${VERSION}" >/dev/null 2>&1; then if ! git rev-parse "v${VERSION}" >/dev/null 2>&1; then
# Create tag if it doesn't exist echo "Debug: Creating new tag v${VERSION}"
git tag -a "v${VERSION}" -m "Release ${VERSION}" git tag -a "v${VERSION}" -m "Release ${VERSION}"
git push origin "v${VERSION}" git push origin "v${VERSION}"
else
echo "Debug: Tag v${VERSION} already exists"
fi
# Test API connection
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 fi
# Create Gitea release using API # Create Gitea release using API
echo "Debug: Creating release..."
RELEASE_DATA="{ RELEASE_DATA="{
\"tag_name\": \"v${VERSION}\", \"tag_name\": \"v${VERSION}\",
\"name\": \"v${VERSION}\", \"name\": \"v${VERSION}\",
\"body\": \"${{ steps.changelog.outputs.CHANGES }}\" \"body\": \"${{ steps.changelog.outputs.CHANGES }}\"
}" }"
# Create release # Create release and capture HTTP status
RESPONSE=$(curl -X POST \ RESPONSE=$(curl -v -s -w "\n%{http_code}" -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}/repos/owner/repo/releases") "${GITEA_API_URL}/api/v1/repos/${GITEA_OWNER}/${GITEA_REPO}/releases")
HTTP_STATUS=$(echo "$RESPONSE" | tail -n1)
RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
# Upload assets echo "Debug: HTTP Status: $HTTP_STATUS"
RELEASE_ID=$(echo $RESPONSE | jq -r .id) echo "Debug: Response Body: $RESPONSE_BODY"
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 [ "$HTTP_STATUS" != "201" ]; then
curl -X POST \ echo "Fehler beim Erstellen des Releases: $RESPONSE_BODY"
-H "Authorization: token ${GITEA_TOKEN}" \ exit 1
-H "Content-Type: application/octet-stream" \ fi
--data-binary @"$file" \
"${GITEA_API_URL}/repos/owner/repo/releases/${RELEASE_ID}/assets?name=${file}"
fi
done

View File

@ -1,5 +1,21 @@
# Changelog # Changelog
## [1.3.23] - 2025-02-21
### Changed
- update webpages for version v1.3.23
### Fixed
- workflow: enhance Gitea release process with debug outputs and API connection checks
## [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.21" version = "1.3.23"
#test #test