Compare commits

...
2 Commits
Author SHA1 Message Date
robin 52a758ff16 chore: add CHANGELOG 2026-09-29 19:18:16 +02:00
robin 7dde81a715 chore: v1.0.1 2026-09-29 19:17:53 +02:00
3 changed files with 51 additions and 3 deletions

No files matched your search

+20 -1
View File
@@ -55,11 +55,30 @@ jobs:
echo -e "\n6010077ebe6b4f930974d1266684e201b8723913" > "$LIC_DIR/android-googlexr-license"
- name: Android Release APK bauen
run: ./gradlew assembleRelease --no-daemon
run: |
VERSION="${GITHUB_REF_NAME#v}"
./gradlew assembleRelease --no-daemon -PversionNameOverride="$VERSION"
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
- name: Release-Notes extrahieren
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v v="$VERSION" '
index($0, "## [" v "]") == 1 {found=1; next}
found && /^## \[/ {exit}
found {print}
' CHANGELOG.md > release-notes.md
[ -s release-notes.md ] || echo "Keine Release-Notes vorhanden." > release-notes.md
- name: Release in Gitea erstellen
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
files: app/build/outputs/apk/release/*.apk
body_path: release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+9
View File
@@ -0,0 +1,9 @@
# Changelog
## [1.0.1] - 2026-09-29
### Neu
- Erste stabile Version mit automatischen APK-Builds
- CHANGELOG.md als Release-Body
### Behoben
- VersionCode und -Name
+22 -2
View File
@@ -3,6 +3,22 @@ plugins {
alias(libs.plugins.kotlin.compose)
}
val tagVersion = (project.findProperty("versionNameOverride") as String?) ?: "0.0.0-dev"
// "1.2.3" oder "1.2.3-alpha9" -> Kern "1.2.3" für den versionCode
val core = tagVersion
.removePrefix("v")
.substringBefore("-")
val parts = core.split(".").map { it.toIntOrNull() ?: 0 }
val major = parts.getOrElse(0) { 0 }
val minor = parts.getOrElse(1) { 0 }
val patch = parts.getOrElse(2) { 0 }
val copyChangelog by tasks.registering(Copy::class) {
from(rootProject.file("CHANGELOG.md"))
into(layout.buildDirectory.dir("generated/changelog"))
}
android {
namespace = "de.schanbro.weekfocus"
compileSdk {
@@ -13,8 +29,8 @@ android {
applicationId = "de.schanbro.weekfocus"
minSdk = 29
targetSdk = 37
versionCode = 1
versionName = "1.0"
versionCode = major * 10000 + minor * 100 + patch
versionName = tagVersion
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -33,6 +49,7 @@ android {
buildFeatures {
compose = true
}
sourceSets["main"].assets.srcDir(layout.buildDirectory.dir("generated/changelog"))
}
dependencies {
@@ -52,3 +69,6 @@ dependencies {
debugImplementation(libs.androidx.compose.ui.test.manifest)
debugImplementation(libs.androidx.compose.ui.tooling)
}
tasks.matching { it.name.startsWith("merge") && it.name.endsWith("Assets") }
.configureEach { dependsOn(copyChangelog) }