Compare commits

...
6 Commits
Author SHA1 Message Date
robin 4a62373992 refactor: move hardcoded texts to strings.xml 2026-10-04 14:19:38 +02:00
robin e589693c67 README.md aktualisiert 2026-10-04 10:19:26 +00:00
robin f5568cf211 README.md aktualisiert 2026-10-03 17:45:08 +00:00
robin 2ab1b230d8 CHANGELOG update
Build & Release Android App / build (push) Successful in 18m15s
2026-10-03 19:19:54 +02:00
robin ce4a40c4f3 chore: refactor: switch from release github action 2026-10-03 19:19:22 +02:00
robin a8375c4025 README.md aktualisiert
add and reorder badges
2026-10-03 16:53:38 +00:00
7 changed files with 90 additions and 30 deletions

No files matched your search

+32 -8
View File
@@ -134,12 +134,36 @@ jobs:
echo "Release-Notes:"
cat "$NOTES_FILE"
- name: Release in Gitea erstellen
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body_path: ${{ runner.temp }}/release_notes.md
files: app/build/outputs/apk/release/WeekFocus-*.apk
- name: Release in Gitea erstellen und APK hochladen
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
API: ${{ github.server_url }}/api/v1/repos/${{ github.repository }}
run: |
set -euo pipefail
TAG="$GITHUB_REF_NAME"
NOTES_FILE="$RUNNER_TEMP/release_notes.md"
AUTH="Authorization: token $TOKEN"
# Release holen oder neu anlegen
CODE=$(curl -sS -o release.json -w '%{http_code}' -H "$AUTH" "$API/releases/tags/$TAG")
if [ "$CODE" = "404" ]; then
jq -n --arg tag "$TAG" --arg name "$TAG" --rawfile body "$NOTES_FILE" \
'{tag_name:$tag, name:$name, body:$body}' > payload.json
curl -fsS -X POST -H "$AUTH" -H "Content-Type: application/json" \
-d @payload.json "$API/releases" -o release.json
elif [ "$CODE" != "200" ]; then
echo "Release konnte nicht abgefragt werden (HTTP $CODE)"
cat release.json
exit 1
fi
RELEASE_ID=$(jq -r .id release.json)
# APK hochladen, gleichnamige alte Assets vorher löschen
for APK in app/build/outputs/apk/release/WeekFocus-*.apk; do
NAME=$(basename "$APK")
for ID in $(jq -r --arg n "$NAME" '.assets[]? | select(.name==$n) | .id' release.json); do
curl -fsS -X DELETE -H "$AUTH" "$API/releases/$RELEASE_ID/assets/$ID"
done
curl -fsS -X POST -H "$AUTH" -F "attachment=@$APK" \
"$API/releases/$RELEASE_ID/assets?name=$NAME"
done
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## [1.1.3] - 2026-10-03
### Changed
- chore: refactor: switch from release github action to bash
## [1.1.1] - 2026-10-03
### Changed
- refactor: move hardcoded text to strings.xml
+44 -17
View File
@@ -11,10 +11,19 @@
<img src="https://raw.githubusercontent.com/ImranR98/Obtainium/main/assets/graphics/badge_obtainium.png" alt="Get it on Obtainium" height="64">
</a>
![Platform](https://img.shields.io/badge/Platform-Android-3DDC84?logo=android&logoColor=white)
[![Release](https://img.shields.io/gitea/v/release/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&label=Release)](https://git.schamagusa.de/Schanbro/WeekFocus/releases)
[![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue)](LICENSE)
[![Translation status](https://weblate.schamagusa.de/widgets/weekfocus/-/svg-badge.svg)](https://weblate.schamagusa.de/engage/weekfocus/)
[![Release](https://img.shields.io/gitea/v/release/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&style=for-the-badge&label=Release)](https://git.schamagusa.de/Schanbro/WeekFocus/releases)
[![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue?style=for-the-badge)](LICENSE)
<!--[![Translation status](https://weblate.schamagusa.de/widgets/weekfocus/-/svg-badge.svg)](https://weblate.schamagusa.de/engage/weekfocus/)-->
![Android](https://img.shields.io/badge/Android-10%2B-3DDC84?style=for-the-badge&logo=android&logoColor=white)
![Language: Kotlin](https://img.shields.io/badge/Language-Kotlin-7F52FF?style=for-the-badge&logo=kotlin&logoColor=white)
![UI: Jetpack Compose](https://img.shields.io/badge/UI-Jetpack%20Compose-4285F4?style=for-the-badge&logo=jetpackcompose&logoColor=white)
![Design: Material 3](https://img.shields.io/badge/Design-Material%203-3DDC84?style=for-the-badge)
<!--[![Stars](https://img.shields.io/gitea/stars/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&style=for-the-badge)](https://git.schamagusa.de/Schanbro/WeekFocus)
[![Forks](https://img.shields.io/gitea/forks/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&style=for-the-badge)](https://git.schamagusa.de/Schanbro/WeekFocus)-->
[![Open Issues](https://img.shields.io/gitea/issues/open/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&style=for-the-badge)](https://git.schamagusa.de/Schanbro/WeekFocus/issues)
[![Last Commit](https://img.shields.io/gitea/last-commit/Schanbro/WeekFocus?gitea_url=https://git.schamagusa.de&style=for-the-badge)](https://git.schamagusa.de/Schanbro/WeekFocus)
</div>
@@ -25,9 +34,9 @@
- [About](#about)
- [How It Works](#how-it-works)
- [Features](#features)
- [Screenshots](#screenshots)
- [Installation](#installation)
- [Building from Source](#building-from-source)
- [Releases](#releases)
- [Contributing](#contributing)
- [License](#license)
- [Translations](#translations)
@@ -55,16 +64,6 @@ No streaks, no pressure, no clutter. Just a gentle daily reminder of what you wa
- 🔒 No ads, no tracking, no unnecessary permissions
- ⚡ Lightweight and battery-friendly
## Screenshots
<!-- Add screenshots here, for example:
<p align="center">
<img src="docs/screenshots/1.png" width="24%" />
<img src="docs/screenshots/2.png" width="24%" />
<img src="docs/screenshots/3.png" width="24%" />
</p>
-->
## Installation
### Recommended: Obtainium
@@ -72,8 +71,7 @@ No streaks, no pressure, no clutter. Just a gentle daily reminder of what you wa
With [Obtainium](https://github.com/ImranR98/Obtainium) you get updates directly from this repository, no app store required.
1. Install Obtainium on your Android device.
2. Tap the badge above or open this link:
[Add WeekFocus to Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://add/https://git.schamagusa.de/Schanbro/WeekFocus)
2. Tap the badge above.
3. Confirm and install the app.
Alternatively, tap **Add App** in Obtainium and paste this URL:
@@ -94,6 +92,7 @@ https://git.schamagusa.de/Schanbro/WeekFocus
- [Android Studio](https://developer.android.com/studio) (latest stable)
- JDK 17 or newer
- Android SDK platform 37 (`minSdk` 29, `targetSdk` 37)
**Steps**
@@ -105,6 +104,34 @@ cd WeekFocus
The resulting APK is located in `app/build/outputs/apk/debug/`.
## Releases
Releases are built automatically with Gitea Actions. Pushing a tag that starts with `v` triggers the workflow, which builds and signs the APK and publishes it as a release together with the notes from `CHANGELOG.md`.
### Starting a release build
Create a tag and push it. The tag name determines the app version (`v1.1.3` builds version `1.1.3`):
```bash
git tag v1.1.3
git push origin v1.1.3
```
You can follow the build under **Actions** in the repository. When it finishes, the signed `WeekFocus-1.1.3.apk` appears on the [Releases](https://git.schamagusa.de/Schanbro/WeekFocus/releases) page.
### Release notes
The workflow takes the notes from the section of `CHANGELOG.md` whose heading starts with the version number:
```markdown
## 1.1.3
- Added Weblate translations
- Fixed widget update at the start of a new week
```
If no matching section exists, the release gets a short placeholder text instead.
## Contributing
Contributions are welcome!
@@ -4,6 +4,7 @@ import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
import android.content.Context
import android.widget.RemoteViews
import androidx.compose.ui.res.stringResource
import java.util.Calendar
import java.util.Random
@@ -43,7 +44,7 @@ class SimpleWidget : AppWidgetProvider() {
val randomIndex = random.nextInt(wordList.size)
wordList[randomIndex]
} else {
"Keine Wörter"
context.getString(R.string.msg_no_words)
}
// 4. RemoteViews aktualisieren
+2 -2
View File
@@ -11,7 +11,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="WOCHENFOKUS"
android:text="@string/title_focus"
android:textSize="11sp"
android:letterSpacing="0.1"
android:textAllCaps="true"
@@ -24,7 +24,7 @@
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="Hallo"
android:text="@string/msg_no_words"
android:textColor="?android:attr/textColorPrimary"
android:textSize="22sp"
android:textStyle="bold" />
+3 -1
View File
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">WeekFocus</string>
<string name="hint_new_word">Enter new Word</string>
<string name="hint_add_word">Add word</string>
<string name="title_saved_words">Saved words:</string>
<string name="msg_no_words_yet">No words yet.</string>
<string name="msg_no_words">No words</string>
<string name="title_focus">FOCUS</string>
</resources>
+3 -1
View File
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">WeekFocus</string>
<string name="app_name" translatable="false">WeekFocus</string>
<string name="hint_new_word">Neues Wort eingeben</string>
<string name="hint_add_word">Wort hinzufügen</string>
<string name="title_saved_words">Gespeicherte Wörter:</string>
<string name="msg_no_words_yet">Noch keine Wörter vorhanden.</string>
<string name="msg_no_words">Keine Wörter</string>
<string name="title_focus">FOKUS</string>
</resources>