forked from Schanbro/WeekFocus
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
57f1c727be | ||
|
|
78d23f9cda | ||
|
|
1bfe36309c | ||
|
|
9ad23b2a3b | ||
|
|
658f6a9506 | ||
|
|
f9b666fe15 | ||
|
|
b1977d790d | ||
|
|
3d5cc10a1a | ||
|
|
52a758ff16 | ||
|
|
7dde81a715 |
No files matched your search
@@ -60,20 +60,86 @@ jobs:
|
||||
echo "sdk.dir=$SDK_PATH" > "$GITHUB_WORKSPACE/local.properties"
|
||||
|
||||
- name: Keystore dekodieren
|
||||
env:
|
||||
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
run: |
|
||||
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > "$RUNNER_TEMP/release.keystore"
|
||||
echo "$KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.keystore"
|
||||
echo "KEYSTORE_PATH=$RUNNER_TEMP/release.keystore" >> $GITHUB_ENV
|
||||
|
||||
- name: Android Release APK bauen
|
||||
run: ./gradlew assembleRelease --no-daemon
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
VERSION="${GITHUB_REF_NAME#v}"
|
||||
|
||||
echo "Baue Version: $VERSION"
|
||||
|
||||
./gradlew assembleRelease \
|
||||
--no-daemon \
|
||||
-PversionNameOverride="$VERSION"
|
||||
|
||||
echo "Erzeugte APK-Dateien:"
|
||||
find app/build/outputs -type f -name "*.apk" -print
|
||||
|
||||
APK_SOURCE="$(find app/build/outputs/apk/release -maxdepth 1 -type f -name "*.apk" ! -name "*unsigned*" | head -n 1)"
|
||||
|
||||
if [ -z "$APK_SOURCE" ]; then
|
||||
echo "Keine Release-APK gefunden."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APK_DIR="app/build/outputs/apk/release"
|
||||
APK_NAME="WeekFocus-${VERSION}.apk"
|
||||
APK_TARGET="$APK_DIR/$APK_NAME"
|
||||
|
||||
mv "$APK_SOURCE" "$APK_TARGET"
|
||||
|
||||
"$ANDROID_HOME/build-tools/36.0.0/apksigner" verify --verbose "$APK_TARGET"
|
||||
|
||||
echo "APK erstellt: $APK_TARGET"
|
||||
ls -lh "$APK_DIR"
|
||||
env:
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
|
||||
|
||||
- name: Release-Notes aus CHANGELOG.md extrahieren
|
||||
run: |
|
||||
VERSION="${GITHUB_REF_NAME#v}"
|
||||
NOTES_FILE="$RUNNER_TEMP/release_notes.md"
|
||||
|
||||
if [ -f CHANGELOG.md ]; then
|
||||
awk -v ver="$VERSION" '
|
||||
/^##[[:space:]]/ {
|
||||
if (found) exit
|
||||
line = $0
|
||||
sub(/^##[[:space:]]+/, "", line)
|
||||
sub(/^\[?v?/, "", line)
|
||||
if (substr(line, 1, length(ver)) == ver) {
|
||||
rest = substr(line, length(ver) + 1)
|
||||
if (rest ~ /^([^0-9.]|$)/) { found = 1 }
|
||||
}
|
||||
next
|
||||
}
|
||||
found { print }
|
||||
' CHANGELOG.md > "$NOTES_FILE"
|
||||
else
|
||||
: > "$NOTES_FILE"
|
||||
fi
|
||||
|
||||
if ! grep -q '[^[:space:]]' "$NOTES_FILE"; then
|
||||
echo "Keine Release-Notes für Version $VERSION vorhanden." > "$NOTES_FILE"
|
||||
fi
|
||||
|
||||
echo "Release-Notes:"
|
||||
cat "$NOTES_FILE"
|
||||
|
||||
- name: Release in Gitea erstellen
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: app/build/outputs/apk/release/*.apk
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: ${{ github.ref_name }}
|
||||
body_path: ${{ runner.temp }}/release_notes.md
|
||||
files: app/build/outputs/apk/release/WeekFocus-*.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Generated
+1
-1
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" default="true" project-jdk-name="jbr-25" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_25" project-jdk-name="jbr-25" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.0] - 2026-10-03
|
||||
|
||||
### New
|
||||
- chore: auto-generate apk files #6
|
||||
+13
-2
@@ -3,6 +3,17 @@ 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 }
|
||||
|
||||
android {
|
||||
namespace = "de.schanbro.weekfocus"
|
||||
compileSdk {
|
||||
@@ -13,8 +24,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"
|
||||
}
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+3
-3
@@ -1,9 +1,9 @@
|
||||
#Fri Sep 18 14:50:25 CEST 2026
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
distributionSha256Sum=bbaeb2fef8710818cf0e261201dab964c572f92b942812df0c3620d62a529a01
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
@@ -114,6 +114,7 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -171,6 +172,7 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -210,6 +212,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
|
||||
Vendored
+24
-12
@@ -19,12 +19,12 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,18 +65,30 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
Reference in new issue
Block a user