12 Commits

Author SHA1 Message Date
36126acc18 chore(android): migrate build.gradle.kts to use Kotlin idioms for properties and improve readability 2026-03-16 19:51:53 +01:00
76192e22fa chore(release): improve Android SDK setup and toolchain verification in workflow 2026-03-16 19:42:04 +01:00
9c2ae12012 chore(release): add Android SDK setup steps to workflow 2026-03-16 19:36:09 +01:00
dcb2cd0afa chore(release): trust Flutter SDK directories in workflow to fix safe directory errors 2026-03-16 19:29:50 +01:00
c2570cdc01 chore(release): remove explicit Flutter version specification in workflow 2026-03-16 19:09:37 +01:00
3c2ad5c7c6 chore(release): add jq installation step in workflow for JSON parsing 2026-03-16 19:06:59 +01:00
f6272a39b4 chore(release): update workflow to use Docker runner instead of Ubuntu 2026-03-16 19:00:14 +01:00
170326dd85 Merge remote-tracking branch 'origin/Develop' into Develop
# Conflicts:
#	.gitea/workflows/release.yaml
2026-03-16 18:55:15 +01:00
74de67de59 fix(release): correct indentation in release workflow script 2026-03-16 18:54:39 +01:00
b0765795b8 Update .gitea/workflows/release.yaml 2026-03-16 17:53:13 +00:00
489c0d5c4f add manual trigger support to release workflow 2026-03-16 18:51:49 +01:00
967dc7d09a broaden release trigger from 'v*' to all tags in workflow config 2026-03-16 18:43:29 +01:00
2 changed files with 76 additions and 14 deletions

View File

@@ -3,11 +3,15 @@ name: Build and Release to F-Droid
on:
push:
tags:
- 'v*'
- '*'
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
runs-on: docker
env:
ANDROID_HOME: /opt/android-sdk
ANDROID_SDK_ROOT: /opt/android-sdk
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -18,12 +22,67 @@ jobs:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install Android SDK packages
run: |
sdkmanager --licenses >/dev/null <<'EOF'
y
y
y
y
y
y
y
y
y
y
EOF
sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"
- name: Install jq
run: |
set -e
SUDO=""
if command -v sudo >/dev/null 2>&1; then
SUDO="sudo"
fi
if command -v apt-get >/dev/null 2>&1; then
$SUDO apt-get update
$SUDO apt-get install -y jq
elif command -v apk >/dev/null 2>&1; then
$SUDO apk add --no-cache jq
elif command -v dnf >/dev/null 2>&1; then
$SUDO dnf install -y jq
elif command -v yum >/dev/null 2>&1; then
$SUDO yum install -y jq
else
echo "Could not find a supported package manager to install jq"
exit 1
fi
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.11.0'
channel: 'stable'
- name: Trust Flutter SDK git directory
run: |
set -e
FLUTTER_BIN_DIR="$(dirname "$(command -v flutter)")"
FLUTTER_SDK_DIR="$(cd "$FLUTTER_BIN_DIR/.." && pwd -P)"
git config --global --add safe.directory "$FLUTTER_SDK_DIR"
if [ -n "${FLUTTER_ROOT:-}" ]; then
git config --global --add safe.directory "$FLUTTER_ROOT"
fi
# Runner-specific fallback observed in failing logs
git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-3.41.4-x64 || true
- name: Verify Android + Flutter toolchain
run: flutter doctor -v
- name: Install dependencies
run: flutter pub get

View File

@@ -1,3 +1,6 @@
import java.io.FileInputStream
import java.util.Properties
plugins {
id("com.android.application")
id("kotlin-android")
@@ -31,25 +34,25 @@ android {
versionName = flutter.versionName
}
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
create("release") {
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
storeFile = keystoreProperties.getProperty("storeFile")?.let { file(it) }
storePassword = keystoreProperties.getProperty("storePassword")
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.release
signingConfig = signingConfigs.getByName("release")
}
}
}