add version code in gradle

This commit is contained in:
Vadim 2023-02-23 22:40:03 +03:00
parent f97668c8d7
commit 90c241db96
2 changed files with 5 additions and 16 deletions

View file

@ -7,13 +7,6 @@ name: Build Prod App Bundle
on:
workflow_dispatch:
inputs:
versionCode:
description: 'Version code'
required: true
versionName:
description: 'Version name'
required: true
jobs:
build:
@ -49,18 +42,12 @@ jobs:
flutter --version
flutter pub get
flutter pub run intl_utils:generate
- name: Bump version
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: android/app/build.gradle
versionCode: ${{ github.event.inputs.versionCode }}
versionName: ${{ github.event.inputs.versionName }}
- name: Build appbundle
run: flutter build appbundle --release --flavor prod --dart-define cameraPreviewAspectRatio=2/3 -t lib/main_prod.dart
- uses: actions/upload-artifact@v3
- name: Upload app bundle to artifacts
uses: actions/upload-artifact@v3
with:
name: m3_lightmeter_bundle
path: build/app/outputs/bundle/prodRelease/app-prod-release.aab

View file

@ -51,7 +51,9 @@ android {
defaultConfig {
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
/// legacy material-lightmeter ap stopped updating after 60022
/// 7xxxx means that it is a new app
versionCode 70000 + flutterVersionCode.toInteger()
versionName flutterVersionName
}