-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (57 loc) · 1.92 KB
/
BuildAPKRelease.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
name: Build Mobile Release
on:
push:
branches:
# Only can be built on Main
- "main"
tags:
# With a tags "v*"
- "v*"
jobs:
BuildRelease:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: "./mobile"
steps:
- name: Checkout latest code
uses: actions/checkout@v2
- name: Setup Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Jakarta"
- name: Get Tags
id: tags
run: echo "::set-output name=tag::${GITHUB_REF#refs/*/}"
- name: Get Current Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M')"
- name: Decoding android/key.properties
run: echo "${{ secrets.KEYPROP_PROD }}" | base64 --decode > android/key.properties
- name: Decoding android/app/travelliu.jks
run: echo "${{ secrets.KEYJKS_PROD }}" | base64 --decode > android/app/travelliu.jks
- name: Setup Java and JDK
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.0.1'
- name: "Build Mobile - Android"
run: |
flutter pub get
flutter build apk
- name: "Prepare artifacts"
run: |
mkdir artifacts
mv ./build/app/outputs/flutter-apk/app-release.apk ./artifacts/travelliu.apk
- name: "Create Release"
uses: ncipollo/release-action@v1
with:
name: "Release Auto Build - ${{ steps.tags.outputs.tag }} - ${{ steps.date.outputs.date }}"
artifacts: "mobile/artifacts/*.apk"
allowUpdates: "true"
body: "An auto build for release at ${{ steps.date.outputs.date }} for ${{ steps.tags.outputs.tag }}"
token: ${{ secrets.GITHUB_TOKEN }}