-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (45 loc) · 1.65 KB
/
build.yaml
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
name: Build APK and release
on:
push:
branches:
- master
paths:
- "!web/**"
tags: "v0.[0-9]+.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- uses: subosito/[email protected]
with:
flutter-version: 1.12.13+hotfix.5
- name: Encrypted files
run: >
echo "$GOOGLE_SERVICES" | base64 --decode > android/app/google-services.json &&
echo "$KEY_JKS" | base64 --decode > android/app/key.jks &&
echo "$KEY_PROPERTIES" | base64 --decode > android/key.properties
env:
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }}
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PROPERTIES: ${{ secrets.KEY_PROPERTIES }}
- run: flutter pub get
- name: Build generic
run: flutter build apk --flavor prod
- name: Build ABIs
run: flutter build apk --flavor prod --target-platform android-arm,android-arm64,android-x64 --split-per-abi
- name: Rename files
run: find build/app/outputs/apk/prod/release -name '*.apk' -exec bash -c ' mv $0 ${0/app-prod/animu}' {} \;
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: |
build/app/outputs/apk/prod/release/animu-armeabi-v7a-release.apk
build/app/outputs/apk/prod/release/animu-arm64-v8a-release.apk
build/app/outputs/apk/prod/release/animu-x86_64-release.apk
build/app/outputs/apk/prod/release/animu-release.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}