Compare commits

...
8 Commits
4 changed files with 25 additions and 13 deletions

No files matched your search

+7 -1
View File
@@ -148,6 +148,7 @@ jobs:
GITEA_API_URL: ${{ steps.gitea_url.outputs.GITEA_API_URL }} GITEA_API_URL: ${{ steps.gitea_url.outputs.GITEA_API_URL }}
GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }} GITEA_REPO: ${{ steps.gitea_url.outputs.GITEA_REPO }}
GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }} GITEA_OWNER: ${{ steps.gitea_url.outputs.GITEA_OWNER }}
CHANGES: ${{ steps.release_notes.outputs.CHANGES }}
run: | run: |
# Debug Token (nur Länge ausgeben für Sicherheit) # Debug Token (nur Länge ausgeben für Sicherheit)
echo "Debug: Token length: ${#GITEA_TOKEN}" echo "Debug: Token length: ${#GITEA_TOKEN}"
@@ -165,7 +166,12 @@ jobs:
# Erstelle zuerst den Release ohne Dateien # Erstelle zuerst den Release ohne Dateien
echo "Debug: Creating release..." echo "Debug: Creating release..."
RELEASE_DATA="{\"tag_name\":\"v${VERSION}\",\"name\":\"v${VERSION}\",\"body\":\"${{ steps.release_notes.outputs.CHANGES }}\"}" # Verwende jq für sicheres JSON-Building
RELEASE_DATA=$(jq -n \
--arg tag "v${VERSION}" \
--arg name "v${VERSION}" \
--arg body "$CHANGES" \
'{tag_name: $tag, name: $name, body: $body}')
RELEASE_RESPONSE=$(curl -s -w "\n%{http_code}" \ RELEASE_RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST \ -X POST \
+14 -11
View File
@@ -6,6 +6,15 @@ on:
RELEASE_TOKEN: RELEASE_TOKEN:
description: 'GitHub token for release creation' description: 'GitHub token for release creation'
required: true required: true
FTP_PASSWORD:
description: 'FTP Password'
required: false
FTP_USER:
description: 'FTP User'
required: false
FTP_HOST:
description: 'FTP Host'
required: false
permissions: permissions:
contents: write contents: write
@@ -119,6 +128,7 @@ jobs:
- name: Create GitHub Release - name: Create GitHub Release
env: env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }} GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
RELEASE_NOTES: ${{ steps.release_notes.outputs.CHANGES }}
run: | run: |
VERSION=${{ steps.get_version.outputs.VERSION }} VERSION=${{ steps.get_version.outputs.VERSION }}
cd .pio/build/esp32dev cd .pio/build/esp32dev
@@ -144,7 +154,7 @@ jobs:
if [ -n "$FILES_TO_UPLOAD" ]; then if [ -n "$FILES_TO_UPLOAD" ]; then
gh release create "v${VERSION}" \ gh release create "v${VERSION}" \
--title "Release ${VERSION}" \ --title "Release ${VERSION}" \
--notes "${{ steps.release_notes.outputs.CHANGES }}" \ --notes "$RELEASE_NOTES" \
$FILES_TO_UPLOAD $FILES_TO_UPLOAD
else else
echo "Error: No files found to upload" echo "Error: No files found to upload"
@@ -157,18 +167,11 @@ jobs:
- name: Upload Firmware via FTP - name: Upload Firmware via FTP
if: success() if: success()
env: env:
FTP_PASSWORD: ${{ vars.FTP_PASSWORD }} FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_USER: ${{ vars.FTP_USER }} FTP_USER: ${{ secrets.FTP_USER }}
FTP_HOST: ${{ vars.FTP_HOST }} FTP_HOST: ${{ secrets.FTP_HOST }}
VERSION: ${{ steps.get_version.outputs.VERSION }} VERSION: ${{ steps.get_version.outputs.VERSION }}
run: | run: |
echo "Environment variables:"
env | grep -E '^FTP_' | while read -r line; do
var_name=$(echo "$line" | cut -d= -f1)
var_value=$(echo "$line" | cut -d= -f2-)
echo "$var_name is $(if [ -n "$var_value" ]; then echo "set"; else echo "empty"; fi)"
done
cd .pio/build/esp32dev cd .pio/build/esp32dev
if [ -n "$FTP_USER" ] && [ -n "$FTP_PASSWORD" ] && [ -n "$FTP_HOST" ]; then if [ -n "$FTP_USER" ] && [ -n "$FTP_PASSWORD" ] && [ -n "$FTP_HOST" ]; then
echo "All FTP credentials are present, attempting upload..." echo "All FTP credentials are present, attempting upload..."
+3
View File
@@ -32,6 +32,9 @@ jobs:
uses: ./.github/workflows/github-release.yml uses: ./.github/workflows/github-release.yml
secrets: secrets:
RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
FTP_USER: ${{ secrets.FTP_USER }}
FTP_HOST: ${{ secrets.FTP_HOST }}
gitea-release: gitea-release:
needs: detect-provider needs: detect-provider
+1 -1
View File
@@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html ; https://docs.platformio.org/page/projectconf.html
[common] [common]
version = "3.0.0-beta2" version = "3.0.4"
to_old_version = "2.0.10" to_old_version = "2.0.10"
## ##