2 Commits
dev ... main

Author SHA1 Message Date
ffe11a5a8a Merge pull request 'ci: build and publish a release apk on main' (#49) from ci/release-apk-main into main 2026-11-28 02:23:58 +01:00
zypherift
f7928ea92a ci: build and publish a release apk on main
The website's .apk button links to the newest main build, and main only published an .aab, which phones can't install.
2026-11-28 02:23:47 +01:00
7 changed files with 27 additions and 16 deletions

View File

@@ -122,6 +122,8 @@ steps:
- BUILD_NAME="$BASE_VERSION-$SHA"
- VERSION_CODE=$((2000 + COMMIT_COUNT))
- flutter build appbundle --release --build-name="$BUILD_NAME" --build-number="$VERSION_CODE"
# universal apk for the website's download button, the .aab is for stores
- flutter build apk --release --build-name="$BUILD_NAME" --build-number="$VERSION_CODE"
- name: build-debug
image: git.firka.app/firka/firka-builder:latest
@@ -157,6 +159,23 @@ steps:
file_name: app-release.aab
update: 'true'
- name: publish-release-apk
image: woodpeckercommunity/plugin-gitea-package:latest
pull: true
when:
- branch: [main, staging]
settings:
user:
from_secret: gitea_username
password:
from_secret: gitea_token
owner: firka
package_name: firka
package_version: ${CI_COMMIT_SHA}
file_source: ./firka/build/app/outputs/flutter-apk/app-release.apk
file_name: app-release.apk
update: 'true'
- name: publish-debug-arm64-v8a
image: woodpeckercommunity/plugin-gitea-package:latest
pull: true

View File

@@ -290,6 +290,12 @@ extension StringExtension on String {
return regex.hasMatch(trim());
}
String firstUpper() {
if (isEmpty) return this;
if (length == 1) this[0].toUpperCase();
return this[0].toUpperCase() + substring(1, length);
}
String shortenName([int start = 0]) {
if (length <= 16 || start >= length) {
return this;

View File

@@ -244,7 +244,7 @@ Future<void> showLessonBottomSheet(
color: appStyle.colors.buttonSecondaryFill,
),
onTap: () {
context.go('/timetable/subject', extra: lesson.subject.loadAndGet()!);
context.go('/timetable/subject', extra: lesson.subject);
},
),
]);

View File

@@ -146,7 +146,6 @@ class _HomeMainScreen extends FirkaState<HomeMainScreen> {
final todayLesson = widget.data.client!.cache
.getClassLessons()
.on(now)
.sortByStart()
.findAllSync();
for (final item in infoItems) {

View File

@@ -62,10 +62,6 @@ class OmissionBar extends StatelessWidget {
.toList();
}
if (segmentColors.isEmpty) {
segmentColors.add(stateColor(null));
}
final bar = ClipRRect(
borderRadius: BorderRadius.circular(8),
child: Row(

View File

@@ -18,14 +18,6 @@ extension IterableExtension<T> on Iterable<T> {
}
}
extension FirstUpperExtension on String {
String firstUpper() {
if (isEmpty) return this;
if (length == 1) this[0].toUpperCase();
return this[0].toUpperCase() + substring(1, length);
}
}
extension MidnightExtension on DateTime {
DateTime getMidnight() {
return subtract(

View File

@@ -1,4 +1,3 @@
import 'package:firka_common/core/extensions.dart';
import 'package:firka_common/data/models/subject_cache_model.dart';
import 'package:flutter/material.dart';
@@ -35,7 +34,7 @@ class GradeSmallCard extends StatelessWidget {
),
Expanded(
child: Text(
subject.name.firstUpper(),
subject.name,
style: appStyle.fonts.B_16SB.apply(
color: appStyle.colors.textPrimary,
),