-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (46 loc) · 1.67 KB
/
android.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: "Android Build"
on:
push:
tags: ['v*']
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 25
steps:
- name: "Code Checkout"
uses: actions/checkout@v3
- name: "Java Setup"
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: "Install Missing Packages"
run: sudo apt-get update -y && sudo apt-get install -y ninja-build libgtk-3-dev
- name: "Flutter Action"
uses: subosito/[email protected]
with:
flutter-version: '3.16.9'
channel: 'stable'
- name: "Flutter: Doctor"
run: flutter doctor
- name: "Flutter: Get Packages"
run: flutter pub get
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties
- name: "Flutter: Build Android APK"
run: flutter build apk
- name: "Flutter: Build Android AppBundle"
run: flutter build appbundle
- name: Release to GitHub
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/flutter-apk/app-release.apk,build/app/outputs/bundle/release/app-release.aab"
tag: ${{ steps.version.outputs.content }}
commit: ${{ github.sha }}
allowUpdates: true