-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (45 loc) · 1.32 KB
/
Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout
- uses: subosito/[email protected]
name: Set up Flutter SDK
with:
channel: 'stable'
cache: true
- name: Install dependencies
run: |
cd khelo
flutter clean
flutter pub get
cd ../data
flutter clean
flutter pub get
cd ../style
flutter clean
flutter pub get
cd ..
- name: Build android APK
run: |
cd khelo
file='VERSION'
fileData=$(cat $file)
IFS='.'
read -a versionValue <<< "$fileData"
buildNumber=$(( ${versionValue[0]} * 1000000 + ${versionValue[1]} * 10000 + CI_PIPELINE_IID ))
IFS=''
buildName="${versionValue[0]}.${versionValue[1]}.$CI_PIPELINE_IID"
echo "Generating android build $buildName $buildNumber"
flutter build apk --release --build-number=$buildNumber --build-name=$buildName
mv build/app/outputs/apk/release/*.apk .
cd ..
- name: Archive Artifacts
uses: actions/upload-artifact@v4
with:
name: khelo.apk
path: khelo/*.apk
if-no-files-found: error