220 lines
9.2 KiB
YAML
220 lines
9.2 KiB
YAML
name: Build Android Production APK
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ] # Nur bei Push/Merge auf main triggern
|
|
workflow_dispatch: # Ermöglicht manuellen Trigger
|
|
|
|
permissions:
|
|
contents: write # Für Release-Erstellung erforderlich
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Production APK
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Code auschecken
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Java einrichten
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '17'
|
|
|
|
- name: Semantic Versionsnummer aus build.gradle.kts extrahieren
|
|
run: |
|
|
# Version aus build.gradle.kts für F-Droid Kompatibilität
|
|
VERSION_NAME=$(grep "versionName = " android/app/build.gradle.kts | sed 's/.*versionName = "\(.*\)".*/\1/')
|
|
VERSION_CODE=$(grep "versionCode = " android/app/build.gradle.kts | sed 's/.*versionCode = \([0-9]*\).*/\1/')
|
|
|
|
# Semantische Versionierung (nicht datums-basiert)
|
|
BUILD_NUMBER="$VERSION_CODE"
|
|
|
|
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
|
|
echo "BUILD_NUMBER=$BUILD_NUMBER" >> $GITHUB_ENV
|
|
echo "VERSION_TAG=v$VERSION_NAME" >> $GITHUB_ENV
|
|
|
|
echo "🚀 Baue Version: $VERSION_NAME (Code: $BUILD_NUMBER)"
|
|
|
|
- name: Version aus build.gradle.kts verifizieren
|
|
run: |
|
|
echo "✅ Verwende Version aus build.gradle.kts:"
|
|
grep -E "versionCode|versionName" android/app/build.gradle.kts
|
|
|
|
- name: Android Signing konfigurieren
|
|
run: |
|
|
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > android/app/simple-notes-release.jks
|
|
echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" > android/key.properties
|
|
echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
|
|
echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties
|
|
echo "storeFile=simple-notes-release.jks" >> android/key.properties
|
|
echo "✅ Signing-Konfiguration erstellt"
|
|
|
|
- name: Produktions-APK bauen (Standard + F-Droid Flavors)
|
|
run: |
|
|
cd android
|
|
./gradlew assembleStandardRelease assembleFdroidRelease --no-daemon --stacktrace
|
|
|
|
- name: APK-Varianten mit Versionsnamen kopieren
|
|
run: |
|
|
mkdir -p apk-output
|
|
|
|
# === Standard Flavor (mit Google Services) ===
|
|
# Universal APK (funktioniert auf allen Geräten)
|
|
cp android/app/build/outputs/apk/standard/release/app-standard-universal-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-standard-universal.apk
|
|
|
|
# ARM64 APK (moderne Geräte 2018+)
|
|
cp android/app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-standard-arm64-v8a.apk
|
|
|
|
# ARMv7 APK (ältere Geräte)
|
|
cp android/app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-standard-armeabi-v7a.apk
|
|
|
|
# === F-Droid Flavor (ohne Google Services) ===
|
|
# Universal APK
|
|
cp android/app/build/outputs/apk/fdroid/release/app-fdroid-universal-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-fdroid-universal.apk
|
|
|
|
# ARM64 APK
|
|
cp android/app/build/outputs/apk/fdroid/release/app-fdroid-arm64-v8a-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-fdroid-arm64-v8a.apk
|
|
|
|
# ARMv7 APK
|
|
cp android/app/build/outputs/apk/fdroid/release/app-fdroid-armeabi-v7a-release.apk \
|
|
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-fdroid-armeabi-v7a.apk
|
|
|
|
echo "✅ APK-Dateien vorbereitet (Standard + F-Droid):"
|
|
ls -lh apk-output/
|
|
|
|
- name: APK-Artefakte hochladen
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: simple-notes-sync-apks-v${{ env.VERSION_NAME }}
|
|
path: apk-output/*.apk
|
|
retention-days: 90 # Produktions-Builds länger aufbewahren
|
|
|
|
- name: Commit-Informationen auslesen
|
|
run: |
|
|
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
echo "COMMIT_DATE=$(git log -1 --format=%cd --date=iso-strict)" >> $GITHUB_ENV
|
|
|
|
# Vollständige Commit-Nachricht mit Zeilenumbrüchen und Emojis (UTF-8)
|
|
{
|
|
echo 'COMMIT_MSG<<EOF'
|
|
git -c core.quotepath=false log -1 --pretty=%B
|
|
echo 'EOF'
|
|
} >> $GITHUB_ENV
|
|
|
|
- name: Create Production Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
tag_name: ${{ env.VERSION_TAG }}
|
|
name: "📝 Simple Notes Sync v${{ env.VERSION_NAME }} (Produktions-Release)"
|
|
files: apk-output/*.apk
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: false
|
|
body: |
|
|
# 📝 Produktions-Release: Simple Notes Sync v${{ env.VERSION_NAME }}
|
|
|
|
## Build-Informationen
|
|
|
|
- **Version:** ${{ env.VERSION_NAME }}+${{ env.BUILD_NUMBER }}
|
|
- **Build-Datum:** ${{ env.COMMIT_DATE }}
|
|
- **Commit:** ${{ env.SHORT_SHA }}
|
|
- **Umgebung:** 🟢 **PRODUKTION**
|
|
|
|
---
|
|
|
|
## 📋 Änderungen
|
|
|
|
${{ env.COMMIT_MSG }}
|
|
|
|
---
|
|
|
|
## 📦 Download & Installation
|
|
|
|
### Welche APK soll ich herunterladen?
|
|
|
|
**Flavor-Wahl (beide identisch, nur für verschiedene Stores):**
|
|
- **Standard**: Für direkten Download / Obtainium / GitHub Releases
|
|
- **F-Droid**: Für F-Droid Store (identisch, nur andere Kennzeichnung)
|
|
|
|
💡 **Hinweis:** Beide Flavors sind 100% FOSS - keine Google Services, kein Tracking!
|
|
|
|
**Architektur-Wahl:**
|
|
|
|
| Dein Gerät | Standard Flavor | F-Droid Flavor | Größe | Hinweis |
|
|
|------------|----------------|----------------|-------|---------|
|
|
| 🤷 Nicht sicher? | `simple-notes-sync-v${{ env.VERSION_NAME }}-standard-universal.apk` | `...-fdroid-universal.apk` | ~5 MB | Funktioniert überall |
|
|
| Modern (2018+) | `simple-notes-sync-v${{ env.VERSION_NAME }}-standard-arm64-v8a.apk` | `...-fdroid-arm64-v8a.apk` | ~3 MB | Schneller, kleiner |
|
|
| Ältere Geräte | `simple-notes-sync-v${{ env.VERSION_NAME }}-standard-armeabi-v7a.apk` | `...-fdroid-armeabi-v7a.apk` | ~3 MB | ARM-Chips vor 2018 |
|
|
|
|
💡 **Empfehlung:** Nimm die **Standard Universal** APK!
|
|
|
|
### Installationsschritte
|
|
1. Lade die passende APK aus den Assets unten herunter
|
|
2. Aktiviere "Installation aus unbekannten Quellen" in den Android-Einstellungen
|
|
3. Öffne die heruntergeladene APK-Datei
|
|
4. Folge den Installationsanweisungen
|
|
5. Konfiguriere die WebDAV-Einstellungen in der App
|
|
|
|
---
|
|
|
|
## ⚙️ Funktionen
|
|
|
|
- ✅ Automatische WebDAV-Synchronisation alle 30 Minuten (~0,4% Akku/Tag)
|
|
- ✅ Intelligente Gateway-Erkennung (automatische Heimnetzwerk-Erkennung)
|
|
- ✅ Material Design 3 Oberfläche
|
|
- ✅ Datenschutzorientiert (kein Tracking, keine Analysen)
|
|
- ✅ Offline-First Architektur
|
|
|
|
---
|
|
|
|
## 🔄 Update von vorheriger Version
|
|
|
|
Installiere diese APK einfach über die bestehende Installation - alle Daten und Einstellungen bleiben erhalten.
|
|
|
|
---
|
|
|
|
## 📱 Obtanium - Auto-Update App
|
|
|
|
Erhalte automatische Updates mit [Obtanium](https://github.com/ImranR98/Obtanium/releases/latest).
|
|
|
|
**Einrichtung:**
|
|
1. Installiere Obtanium über den Link oben
|
|
2. Füge die App mit dieser URL hinzu: `https://github.com/inentory69/simple-notes-sync`
|
|
3. Aktiviere Auto-Updates
|
|
|
|
---
|
|
|
|
## 🆘 Support
|
|
|
|
Bei Problemen oder Fragen öffne bitte ein Issue auf GitHub.
|
|
|
|
---
|
|
|
|
## 🔒 Datenschutz & Sicherheit
|
|
|
|
- Alle Daten werden über deinen eigenen WebDAV-Server synchronisiert (self-hosted)
|
|
- Keine Drittanbieter-Analysen oder Tracking
|
|
- Keine Internet-Berechtigungen außer für WebDAV-Sync
|
|
- Unterstützt HTTP (lokal) und HTTPS (extern) - du entscheidest
|
|
- Open Source - prüfe den Code selbst
|
|
|
|
---
|
|
|
|
## 🛠️ Erstellt mit
|
|
|
|
- **Sprache:** Kotlin
|
|
- **UI:** Material Design 3
|
|
- **Sync:** WorkManager + WebDAV
|
|
- **Target SDK:** Android 16 (API 36)
|
|
- **Min SDK:** Android 8.0 (API 26)
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|