-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.72 KB
/
main.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
name: Build and Release APKs
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create tag
id: tag
uses: jacopocarlini/action-autotag@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Display tag name
run: echo ${{ steps.tag.outputs.tagname }}
- name: Display version from pubspec.yaml
run: echo ${{ steps.tag.outputs.version }}
- name: Setup Java JDK
if: ${{ steps.tag.outputs.tagname }}
uses: actions/setup-java@v1
with:
java-version: "8.x"
- name: Setup Flutter action
if: ${{ steps.tag.outputs.tagname }}
uses: subosito/flutter-action@v1
with:
flutter-version: "2.2.x"
- name: Flutter pub get
if: ${{ steps.tag.outputs.tagname }}
run: flutter pub get
- name: Flutter build split apk releases
if: ${{ steps.tag.outputs.tagname }}
run: flutter build apk --release --split-per-abi
- name: Move apks to github releases
if: ${{ steps.tag.outputs.tagname }}
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*.apk"
token: ${{ secrets.GITHUB_TOKEN }}
commit: main
tag: ${{ steps.tag.outputs.version }}
body: ${{ github.event.head_commit.message }}
continue-on-error: true