Compare commits

...

28 commits
1.2.1 ... main

Author SHA1 Message Date
Michael
29f98db4a0 chore: change version code in app 2025-05-12 19:01:05 +03:00
Michael
c95e5ff1e5 ci: fix sign key alias 2025-05-12 18:47:17 +03:00
Michael
3ec85c61e1 ci: delete useless actions 2025-05-12 18:37:56 +03:00
Michael
040e56a2b4 chore: build changes 2025-05-12 18:14:49 +03:00
mi6e4ka
5196f24fae ci: fix sign 2025-05-12 10:45:36 +00:00
mi6e4ka
0acc8bd157 Sign apk by dedicated build step 2025-05-12 10:27:38 +00:00
mi6e4ka
6d2ab2e473 Disable signing apk by flutter 2025-05-12 09:39:10 +00:00
Michael
034a9fc86e ci: last changes 2025-05-12 01:41:14 +03:00
Michael
b8ba1c4ccc ci: attach files to release 2025-05-12 00:40:48 +03:00
Michael
6c028b9a34 chore: bump ndkVersion to 27.0.12077973 2025-05-12 00:11:11 +03:00
Michael
e1cb87c8fd fix: allow build with debug keys without release key 2025-05-11 23:57:58 +03:00
Michael
180cf8fdfb ci: remove useless cache 2025-05-11 23:57:22 +03:00
Michael
d12f4470fd ci: use android folder as cache key 2025-05-10 14:32:07 +03:00
Michael
de7dacaf6e ci: fix caching 2025-05-10 14:16:17 +03:00
Michael
fd871d3d21 ci: publish all apk in one zip 2025-05-10 14:12:56 +03:00
Michael
5eea16223a ci: fix ci 2025-05-10 13:44:44 +03:00
Michael
65ba1bd5f7 ci: upd 2025-05-08 19:38:04 +03:00
Michael
20cca0a6d1 ci: upd 2025-05-08 19:15:48 +03:00
Michael
0d11e61e0c ci: add java and android prepare 2025-05-08 18:59:23 +03:00
Michael
cbe138bee9 ci: add debug 2025-05-08 15:27:00 +03:00
Michael
c4b625d114 ci: add debug 2025-05-08 15:21:02 +03:00
Michael
5313adcc95 ci: initial 2025-05-08 15:02:23 +03:00
Michael
9c79e3c304 docs: add safety info 2025-05-08 14:53:03 +03:00
Michael
915d7da79d chore: prepare for v1.3.0 2025-05-08 14:32:13 +03:00
Michael
b2f84afafa fix: small changes 2025-05-08 14:31:34 +03:00
Michael
ae78eb5ebd feat: add securety info block 2025-05-08 14:31:12 +03:00
Michael
857c656b51 feat: show android version instead of api version 2025-05-08 14:30:24 +03:00
Michael
deed4ddd5a build: pin flutter at commit c236373904 2025-05-02 00:54:31 +03:00
8 changed files with 279 additions and 19 deletions

View file

@ -0,0 +1,149 @@
name: Flutter Build (Signed APK)
on:
push:
branches:
- ci-dev
tags: ["*"]
workflow_dispatch:
env:
FLUTTER_PATH: "flutter" # Путь к подмодулю Flutter
jobs:
build:
runs-on: docker
container:
image: codeberg.org/mi6e4ka/android-build-ct:latest
env:
TAR_OPTIONS: "--no-same-owner"
# defaults:
# run:
# working-directory: /home/runner/openstore
steps:
# 1. Checkout репозиторий + подмодули
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# - name: Pull flutter tags
# run: |
# cd flutter && git fetch --tags --depth=1 && cd ..
# - name: Set up JDK 21
# uses: https://github.com/actions/setup-java@v3
# with:
# java-version: "21"
# distribution: "temurin"
# - name: Cache Android SDK
# uses: actions/cache@v3
# with:
# path: |
# ~/android-sdk
# ~/.android
# key: ${{ runner.os }}-android-${{ hashFiles('android/build.gradle.kts') }}
# - name: Setup Android SDK
# uses: https://github.com/android-actions/setup-android@v3
# - name: Cache Flutter
# uses: actions/cache@v3
# with:
# path: |
# ./flutter/bin/cache
# key: ${{ runner.os }}-flutter-${{ hashFiles('.gitmodules') }}
- name: Flutter install and check
run: ./flutter/bin/flutter doctor -v
# 3. Создаем key.properties и загружаем ключ (секреты Forgejo)
#- name: Setup signing keys
# run: |
# # Создаем директорию для ключа
# mkdir -p android/app
#
# # Создаем key.properties
# echo "storePassword=${{ secrets.KEY_PASSWORD }}" > android/key.properties
# echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties
# echo "keyAlias=upload" >> android/key.properties
# echo "storeFile=key.jks" >> android/key.properties
#
# # Декодируем base64-ключ (хранится в secrets.KEYSTORE_BASE64)
# echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/key.jks
# 4. Кэширование
# - name: Cache dependencies
# uses: actions/cache@v4
# with:
# path: |
# flutter/bin/cache
# .dart_tool
# key: ${{ runner.os }}-flutter-${{ hashFiles('pubspec.lock') }}
# 6. Собираем подписанный APK
# - name: Cache Build
# uses: actions/cache@v3
# with:
# path: |
# ./android/.gradle
# ~/.gradle
# key: ${{ runner.os }}-android-${{ hashFiles('android/') }}
- name: Build unsigned APK
run: |
./flutter/bin/flutter build apk --release --split-per-abi -v
- name: Sign apk
uses: https://github.com/ilharp/sign-android-release@v2
id: sign_app
with:
releaseDir: build/app/outputs/flutter-apk
signingKey: ${{ secrets.KEYSTORE_BASE64 }}
keyAlias: upload
keyStorePassword: ${{ secrets.KEY_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Print build dir
run: pwd
- name: List release files
run: ls build/app/outputs/flutter-apk
# 7. Сохраняем артефакты
- name: Upload release apk
uses: actions/upload-artifact@v3
with:
name: app-release
path: build/app/outputs/flutter-apk/*-signed.apk
- name: Get Release ID
id: get_release
run: |
RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/tags/$GITHUB_REF_NAME)
RELEASE_ID=$(echo "$RESPONSE" | grep -o '"id":[0-9]*' | head -n1 | grep -o '[0-9]*')
if [ -z "$RELEASE_ID" ]; then
RELEASE_ID=null
fi
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
- name: Upload Asset
if: steps.get_release.outputs.release_id != 'null'
run: |
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: multipart/form-data" \
-F "attachment=@build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk" \
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-arm64-v8a-release.apk"
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: multipart/form-data" \
-F "attachment=@build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk" \
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-armeabi-v7a-release.apk"
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: multipart/form-data" \
-F "attachment=@build/app/outputs/flutter-apk/app-x86_64-release-signed.apk" \
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-x86_64-release.apk"

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "flutter"]
path = flutter
url = https://github.com/flutter/flutter.git

5
SAFETY.md Normal file
View file

@ -0,0 +1,5 @@
# SAFETY
> Все приложения опубликованные в RuStore проходят обязательную проверку на вирусы и опасные разрешения, в том числе предоставленные из сторонних источников. Однако, вся ответственность за установленные приложения лежит на конечном пользователе.
[Как RuStore проверяет приложения](https://www.rustore.ru/help/users/authorization/trust-rustore)

View file

@ -17,7 +17,8 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "dev.mi6e4ka.openstore"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
// ndkVersion = flutter.ndkVersion
ndkVersion = "27.2.12479018"
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
@ -40,17 +41,19 @@ android {
}
signingConfigs {
create("release") {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties["keyAlias"] as String
keyPassword = keystoreProperties["keyPassword"] as String
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
storePassword = keystoreProperties["storePassword"] as String
}
}
}
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.getByName("release")
signingConfig = null
isMinifyEnabled = true
isShrinkResources = true
}
}
dependenciesInfo {

1
flutter Submodule

@ -0,0 +1 @@
Subproject commit c23637390482d4cf9598c3ce3f2be31aa7332daf

View file

@ -11,6 +11,47 @@ class AppPage extends StatefulWidget {
State<AppPage> createState() => _AppPageState();
}
String getAndroidVersion(int apiLevel) {
const versions = {
1: '1.0',
2: '1.1',
3: '1.5',
4: '1.6',
5: '2.0',
6: '2.0.1',
7: '2.1',
8: '2.2',
9: '2.3',
10: '2.3.3',
11: '3.0',
12: '3.1',
13: '3.2',
14: '4.0',
15: '4.0.3',
16: '4.1',
17: '4.2',
18: '4.3',
19: '4.4',
20: '4.4W', // Wear-версия
21: '5.0',
22: '5.1',
23: '6.0',
24: '7.0',
25: '7.1',
26: '8.0',
27: '8.1',
28: '9.0',
29: '10',
30: '11',
31: '12',
32: '12L', // Android 12L
33: '13',
34: '14',
};
return versions[apiLevel] ?? '? (API $apiLevel)';
}
class _AppPageState extends State<AppPage> {
Map? _appInfo;
@override
@ -56,6 +97,41 @@ class _AppPageState extends State<AppPage> {
? ListView(
padding: const EdgeInsets.fromLTRB(15, 0, 15, 15),
children: [
Card(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 15),
surfaceTintColor: _appInfo?["aggregatorInfo"] == null
? const Color.fromARGB(255, 0, 255, 0)
: const Color.fromARGB(255, 255, 187, 0),
child: Padding(
padding: const EdgeInsets.all(16),
child: Row(
spacing: 16,
children: [
const Icon(
Icons.security,
size: 32,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"предоставлено ${_appInfo?["aggregatorInfo"]?["source"] ?? "RuStore"}",
style: TextStyle(fontSize: 16),
),
Text(
_appInfo?["aggregatorInfo"] == null
? (_appInfo?["companyLegalForm"] ==
"INDIVIDUAL"
? "разработчик - частное лицо"
: "разработчик - компания")
: "разработчик: ${_appInfo?["aggregatorInfo"]?["companyName"]}",
style: const TextStyle(fontSize: 14),
)
],
)
],
),
)),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -121,8 +197,9 @@ class _AppPageState extends State<AppPage> {
bottomText: "Версия",
),
_InfoCard(
topText: _appInfo?["minSdkVersion"].toString() ?? "",
bottomText: "minSdkVersion",
topText:
"${getAndroidVersion(_appInfo?["minSdkVersion"] ?? 0)}+",
bottomText: "Android",
),
_InfoCard(
topText:

View file

@ -22,7 +22,9 @@ final _router = GoRouter(
path: 'instruction',
builder: (context, state) {
print(state.uri.queryParameters["utm_campaign"]);
return AppPage(packageName: "ru.nspk.mirpay");
return AppPage(
packageName: state.uri.queryParameters["utm_campaign"] ??
"ru.nspk.mirpay");
})
]),
GoRoute(
@ -45,10 +47,6 @@ class MyApp extends StatelessWidget {
builder: (lightColorScheme, darkColorScheme) => MaterialApp.router(
title: 'OpenStore',
theme: ThemeData(
pageTransitionsTheme: const PageTransitionsTheme(builders: {
TargetPlatform.android:
PredictiveBackPageTransitionsBuilder(),
}),
colorScheme: darkColorScheme ??
ColorScheme.fromSeed(
seedColor: Colors.blue,
@ -74,7 +72,31 @@ class HomePage extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(),
Padding(
padding: EdgeInsets.all(10),
child: InkWell(
borderRadius: BorderRadius.circular(12),
onTap: () => launchUrlString(
"https://codeberg.org/mi6e4ka/openstore/src/branch/main/SAFETY.md"),
child: const Card(
child: Padding(
padding: EdgeInsets.all(10),
child: Row(
spacing: 8,
children: [
Icon(
Icons.info_rounded,
size: 32,
),
Text(
"О безопасности приложений",
style: TextStyle(fontSize: 18),
)
],
),
),
)),
),
Row(
children: [
const SizedBox(
@ -107,7 +129,7 @@ class HomePage extends StatelessWidget {
children: [
InkWell(
onTap: () async => await launchUrlString(
"https://git.mi6e4ka.dev/mi6e4ka/openstore"),
"https://codeberg.org/mi6e4ka/openstore"),
child: const Text(
"source code",
style: TextStyle(
@ -136,7 +158,7 @@ class HomePage extends StatelessWidget {
: Container(),
],
),
const Text("v1.2.1")
const Text("v1.3.1")
],
),
)

View file

@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.2.1+2
version: 1.3.1+4
environment:
sdk: ">=3.4.3 <4.0.0"