-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.69 KB
/
build-aab-apk.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
58
59
60
61
name: Flutter Build and Release AAB and APK
on:
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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: Get dependencies
run: flutter pub get
- name: Decode Keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks
- name: Build AAB
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
run: |
flutter build appbundle --release \
--build-number=${{ github.run_number }} \
--build-name=0.2.${{ github.run_number }}
- name: Build APK
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
run: |
flutter build apk --release --split-per-abi \
--build-number=${{ github.run_number }} \
--build-name=0.2.${{ github.run_number }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/*.apk,build/app/outputs/bundle/release/app-release.aab"
tag: v0.2.${{ github.run_number }}
name: Release v0.2.${{ github.run_number }}
body: New release for version 0.2.${{ github.run_number }}
token: ${{ secrets.GITHUB_TOKEN }}