-
-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (42 loc) · 1.4 KB
/
build.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
name: Flutter CICD # action name
on:
push:
tags:
- "v*"
jobs:
build: # job's name
runs-on: ubuntu-latest # container os
env: # ADD environment variables
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PATH: ${{ github.workspace }}/key.jks
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
defaults:
run:
working-directory: app
permissions:
contents: write
steps:
- uses: actions/checkout@v2 # cd to current dir
- uses: actions/setup-java@v2
with:
distribution: 'adopt' # See 'Supported distributions' for available options
java-version: '17'
- name: Create key file
run: echo $KEY_JKS | base64 -di > $KEY_PATH
- uses: subosito/flutter-action@v1
with:
flutter-version: 3.22.2
- run: flutter pub get
# - run: flutter test
- run: flutter build apk --release --split-per-abi
- run: flutter build appbundle
- name: Create github artifact release # disable this to save storage
uses: ncipollo/release-action@v1
with:
artifacts: "app/build/app/outputs/apk/release/*.apk,app/build/app/outputs/bundle/release/app-release.aab"
- name: Upload app bundle artifact
uses: actions/upload-artifact@v2
with:
name: appbundle
path: app/build/app/outputs/bundle/release/app-release.aab