-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.27 KB
/
dart.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
name: Flutter Build and Upload APK test
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update KeyStore password in gradle properties
run: sed -i 's/#{KEYSTORE_PASSWORD}#/${{ secrets.KEYSTORE_PASSWORD }}/g' android/key.properties
- name: Update KeyStore key password in gradle properties
run: sed -i 's/#{KEY_PASSWORD}#/${{ secrets.KEY_PASSWORD }}/g' android/key.properties
- name: Update KeyStore alias in gradle properties
run: sed -i 's/#{KEY_ALIAS}#/${{ secrets.KEY_ALIAS }}/g' android/key.properties
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Clean dependencies
run: flutter clean
- name: Get dependencies
run: flutter pub get
- name: Build aab
run: flutter build appbundle --release
- name: Build APK
run: flutter build apk --release --split-per-abi
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*"
tag: v0.0.2
token: ${{ secrets.TOKEN }}