Skip to content

Commit

Permalink
Implement workflow to test build apk
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-pratik-k committed Jan 17, 2024
1 parent ff21e84 commit 12f26c7
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Analyze
name: Build

on: push

jobs:
analyze:
build:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -32,16 +32,18 @@ jobs:
cd ..
- name: Lint test
- name: Build android APK
run: |
cd app
dart analyze --fatal-infos
cd ../data
dart analyze --fatal-infos
cd ../style
dart analyze --fatal-infos
file='VERSION'
fileData=`cat $file`
IFS='.'
read -a versionValue <<< "$fileData"
buildNumber=$(expr `expr ${versionValue[0]} \* 1000000` + `expr ${versionValue[1]} \* 10000` + ${CI_PIPELINE_IID})
IFS=''
buildName="${versionValue[0]}.${versionValue[1]}.$CI_PIPELINE_IID"
echo "Generating android build $buildName $buildNumber"
flutter build apk --flavor prod --release --build-number=$buildNumber --build-name=$buildName
mv build/app/outputs/apk/release/*.apk .
cd ..

0 comments on commit 12f26c7

Please sign in to comment.