Files
simple-notes-sync/.github/workflows/build-production-apk.yml
inventory69 55401977e3 fix: Korrigiere GitHub Actions Workflow für Standard-Flavor und semantische Versionierung
- Verwende assembleStandardRelease statt assembleRelease
- Korrigiere APK-Pfade: app-standard-*-release.apk
- Verwende versionName/versionCode aus build.gradle.kts (1.1.0/2)
- Keine Überschreibung mit Datums-Versionierung mehr
- F-Droid kompatible semantische Versionierung (v1.1.0)
2025-12-22 01:03:04 +01:00

196 lines
7.5 KiB
YAML

name: Build Android Production APK
on:
push:
branches: [ main ] # Trigger on push to main branch
workflow_dispatch: # Allow manual trigger
permissions:
contents: write # Required for creating releases
jobs:
build:
name: Build Production APK
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Generate Production version number
run: |
# Extract version from build.gradle.kts
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/')
# Use extracted version for F-Droid compatibility
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 "🚀 Building version: $VERSION_NAME (code: $BUILD_NUMBER)"
- name: Verify build.gradle.kts version
run: |
echo "✅ Using version from build.gradle.kts:"
grep -E "versionCode|versionName" android/app/build.gradle.kts
- name: Setup Android signing
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 configuration created"
- name: Build Production APK (Release)
run: |
cd android
./gradlew assembleStandardRelease --no-daemon --stacktrace
- name: Copy APK variants to root with version names
run: |
mkdir -p apk-output
# Universal APK
cp android/app/build/outputs/apk/standard/release/app-standard-universal-release.apk \
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-universal.apk
# ARM64 APK
cp android/app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release.apk \
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-arm64-v8a.apk
# ARMv7 APK
cp android/app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release.apk \
apk-output/simple-notes-sync-v${{ env.VERSION_NAME }}-armeabi-v7a.apk
echo "✅ APK files prepared:"
ls -lh apk-output/
- name: Upload APK artifacts
uses: actions/upload-artifact@v4
with:
name: simple-notes-sync-apks-v${{ env.VERSION_NAME }}
path: apk-output/*.apk
retention-days: 90 # Keep production builds longer
- name: Get commit info
run: |
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "COMMIT_DATE=$(git log -1 --format=%cd --date=iso-strict)" >> $GITHUB_ENV
# Get full commit message preserving newlines and 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?
| Dein Gerät | Lade diese APK herunter | Größe | Kompatibilität |
|------------|------------------------|-------|----------------|
| 🤷 Nicht sicher? | `simple-notes-sync-v${{ env.VERSION_NAME }}-universal.apk` | ~5 MB | Funktioniert auf allen Geräten |
| Modern (2018+) | `simple-notes-sync-v${{ env.VERSION_NAME }}-arm64-v8a.apk` | ~3 MB | Schneller, kleiner |
| Ältere Geräte | `simple-notes-sync-v${{ env.VERSION_NAME }}-armeabi-v7a.apk` | ~3 MB | Ältere ARM-Chips |
### 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/dettmersLiq/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
- Keine Drittanbieter-Analysen oder Tracking
- Keine Internet-Berechtigungen außer für WebDAV-Sync
- Alle Synchronisationsvorgänge verschlüsselt (HTTPS)
- 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 }}