-
-
Notifications
You must be signed in to change notification settings - Fork 54
77 lines (65 loc) · 3.03 KB
/
github_release.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: GitHub release
on:
release:
types:
- published
jobs:
append_to_release:
name: Append project info
runs-on: ubuntu-latest
steps:
- name: Add project info to Release
uses: irongut/EditRelease@v1.2.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: ${{ github.event.release.id }}
files: ".github/workflows/assets/project_info.md"
build_github:
name: Build split apks and attach to release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "11"
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ vars.FLUTTER_VERSION }}
- name: Install dependencies
run: |
flutter config --no-analytics
flutter pub get
- name: Configure Keystore for Android
run: |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks
echo "storeFile=upload-keystore.jks" >> key.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
env:
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }}
working-directory: android
- name: Build full APK
run: flutter build apk --release
- name: Build APKs split per abi
run: flutter build apk --release --split-per-abi
- name: Rename output files
run: |
mv "build/app/outputs/flutter-apk/app-release.apk" "build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-release.apk"
mv "build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk" "build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-armeabi-v7a-release.apk"
mv "build/app/outputs/flutter-apk/app-arm64-v8a-release.apk" "build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-arm64-v8a-release.apk"
mv "build/app/outputs/flutter-apk/app-x86_64-release.apk" "build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-x86_64-release.apk"
- name: Attach apk files
uses: softprops/action-gh-release@v1
with:
files: |
build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-release.apk
build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-armeabi-v7a-release.apk
build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-arm64-v8a-release.apk
build/app/outputs/flutter-apk/openreads-${{ github.event.release.tag_name }}-x86_64-release.apk