Compare commits
	
		
			9 Commits
		
	
	
		
			v1.3.24
			...
			0dfb158959
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 0dfb158959 | |||
| 75c774bb24 | |||
| cf80adb43c | |||
| 36d50cbe7f | |||
| 9148d207c7 | |||
| 5f6fef9448 | |||
| 946202de0e | |||
| 41a3717347 | |||
| 255c820439 | 
							
								
								
									
										54
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										54
									
								
								.github/workflows/gitea-release.yml
									
									
									
									
										vendored
									
									
								
							@@ -2,6 +2,10 @@ name: Gitea Release
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  workflow_call:
 | 
			
		||||
    secrets:
 | 
			
		||||
      GITEA_TOKEN:
 | 
			
		||||
        description: 'Token für Gitea API-Zugriff'
 | 
			
		||||
        required: true
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  create-release:
 | 
			
		||||
@@ -79,14 +83,15 @@ jobs:
 | 
			
		||||
        echo "GITEA_SERVER_URL=${GITEA_SERVER_URL:-not set}"
 | 
			
		||||
        echo "GITHUB_REPOSITORY=${GITHUB_REPOSITORY:-not set}"
 | 
			
		||||
        echo "GITEA_REPOSITORY=${GITEA_REPOSITORY:-not set}"
 | 
			
		||||
        echo "RUNNER_NAME=${RUNNER_NAME:-not set}"
 | 
			
		||||
        
 | 
			
		||||
        # Set API URL based on environment
 | 
			
		||||
        if [ -n "${GITEA_SERVER_URL}" ]; then
 | 
			
		||||
          GITEA_API_URL="${GITEA_SERVER_URL}"
 | 
			
		||||
          GITEA_REPO=$(echo "${GITEA_REPOSITORY}" | cut -d'/' -f2)
 | 
			
		||||
          GITEA_OWNER=$(echo "${GITEA_REPOSITORY}" | cut -d'/' -f1)
 | 
			
		||||
        if [ -n "${GITEA_ACTIONS}" ] || [ -n "${GITEA_REPOSITORY}" ] || [[ "${RUNNER_NAME}" == *"gitea"* ]]; then
 | 
			
		||||
          GITEA_API_URL="${GITHUB_SERVER_URL}"
 | 
			
		||||
          GITEA_REPO=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f2)
 | 
			
		||||
          GITEA_OWNER=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f1)
 | 
			
		||||
        else
 | 
			
		||||
          echo "Error: Could not determine Gitea server URL"
 | 
			
		||||
          echo "Error: This workflow is only for Gitea"
 | 
			
		||||
          exit 1
 | 
			
		||||
        fi
 | 
			
		||||
        
 | 
			
		||||
@@ -101,12 +106,19 @@ jobs:
 | 
			
		||||
        GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }}
 | 
			
		||||
        GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }}
 | 
			
		||||
      run: |
 | 
			
		||||
        # Debug Token (nur Länge ausgeben für Sicherheit)
 | 
			
		||||
        echo "Debug: Token length: ${#GITEA_TOKEN}"
 | 
			
		||||
        if [ -z "$GITEA_TOKEN" ]; then
 | 
			
		||||
          echo "Error: GITEA_TOKEN is empty"
 | 
			
		||||
          exit 1
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        VERSION=${{ steps.get_version.outputs.VERSION }}
 | 
			
		||||
        cd .pio/build/esp32dev
 | 
			
		||||
        
 | 
			
		||||
        # Debug-Ausgaben
 | 
			
		||||
        echo "Debug: Checking API URL..."
 | 
			
		||||
        echo "GITEA_API_URL=${GITEA_API_URL}"
 | 
			
		||||
        echo "Debug: API URL: ${GITEA_API_URL}"
 | 
			
		||||
        echo "Debug: Repository: ${GITEA_OWNER}/${GITEA_REPO}"
 | 
			
		||||
        
 | 
			
		||||
        # Prepare files for upload
 | 
			
		||||
        FILES=""
 | 
			
		||||
@@ -117,18 +129,11 @@ jobs:
 | 
			
		||||
          fi
 | 
			
		||||
        done
 | 
			
		||||
 | 
			
		||||
        # Check if tag exists
 | 
			
		||||
        if ! git rev-parse "v${VERSION}" >/dev/null 2>&1; then
 | 
			
		||||
          echo "Debug: Creating new tag v${VERSION}"
 | 
			
		||||
          git tag -a "v${VERSION}" -m "Release ${VERSION}"
 | 
			
		||||
          git push origin "v${VERSION}"
 | 
			
		||||
        else
 | 
			
		||||
          echo "Debug: Tag v${VERSION} already exists"
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        # Test API connection
 | 
			
		||||
        # 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_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"
 | 
			
		||||
@@ -136,7 +141,7 @@ jobs:
 | 
			
		||||
          exit 1
 | 
			
		||||
        fi
 | 
			
		||||
 | 
			
		||||
        # Create Gitea release using API
 | 
			
		||||
        # Create release using API
 | 
			
		||||
        echo "Debug: Creating release..."
 | 
			
		||||
        RELEASE_DATA="{
 | 
			
		||||
          \"tag_name\": \"v${VERSION}\",
 | 
			
		||||
@@ -144,8 +149,9 @@ jobs:
 | 
			
		||||
          \"body\": \"${{ steps.changelog.outputs.CHANGES }}\"
 | 
			
		||||
        }"
 | 
			
		||||
 | 
			
		||||
        # Create release and capture HTTP status
 | 
			
		||||
        RESPONSE=$(curl -v -s -w "\n%{http_code}" -X POST \
 | 
			
		||||
        # Create release with explicit token header
 | 
			
		||||
        RESPONSE=$(curl -s -w "\n%{http_code}" \
 | 
			
		||||
          -X POST \
 | 
			
		||||
          -H "Authorization: token ${GITEA_TOKEN}" \
 | 
			
		||||
          -H "Content-Type: application/json" \
 | 
			
		||||
          -d "$RELEASE_DATA" \
 | 
			
		||||
@@ -155,9 +161,7 @@ jobs:
 | 
			
		||||
        RESPONSE_BODY=$(echo "$RESPONSE" | head -n -1)
 | 
			
		||||
 | 
			
		||||
        echo "Debug: HTTP Status: $HTTP_STATUS"
 | 
			
		||||
        echo "Debug: Response Body: $RESPONSE_BODY"
 | 
			
		||||
 | 
			
		||||
        if [ "$HTTP_STATUS" != "201" ]; then
 | 
			
		||||
          echo "Fehler beim Erstellen des Releases: $RESPONSE_BODY"
 | 
			
		||||
          echo "Error: Failed to create release"
 | 
			
		||||
          echo "Response: $RESPONSE_BODY"
 | 
			
		||||
          exit 1
 | 
			
		||||
        fi
 | 
			
		||||
							
								
								
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@@ -37,3 +37,5 @@ jobs:
 | 
			
		||||
    needs: detect-provider
 | 
			
		||||
    if: needs.detect-provider.outputs.provider == 'gitea'
 | 
			
		||||
    uses: ./.github/workflows/gitea-release.yml
 | 
			
		||||
    secrets:
 | 
			
		||||
      GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
 | 
			
		||||
							
								
								
									
										22
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								CHANGELOG.md
									
									
									
									
									
								
							@@ -1,5 +1,27 @@
 | 
			
		||||
# Changelog
 | 
			
		||||
 | 
			
		||||
## [1.3.27] - 2025-02-21
 | 
			
		||||
### Added
 | 
			
		||||
- workflow: add GITEA_TOKEN secret for Gitea API access in release workflows
 | 
			
		||||
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.27
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.26] - 2025-02-21
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.26
 | 
			
		||||
 | 
			
		||||
### Fixed
 | 
			
		||||
- workflow: improve Gitea release workflow with enhanced error handling and debug outputs
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.25] - 2025-02-21
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.25
 | 
			
		||||
- workflow: update Gitea release workflow to include RUNNER_NAME and improve error handling
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## [1.3.24] - 2025-02-21
 | 
			
		||||
### Changed
 | 
			
		||||
- update webpages for version v1.3.24
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@
 | 
			
		||||
; https://docs.platformio.org/page/projectconf.html
 | 
			
		||||
 | 
			
		||||
[common]
 | 
			
		||||
version = "1.3.24"
 | 
			
		||||
version = "1.3.27"
 | 
			
		||||
 | 
			
		||||
#test
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user