-
-
Notifications
You must be signed in to change notification settings - Fork 26
92 lines (77 loc) · 2.54 KB
/
android-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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Android Release
on:
push:
tags:
- '*'
workflow_dispatch:
# 4
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: "17"
cache: 'gradle'
- uses: subosito/flutter-action@v2
with:
flutter-version: "3.19.3"
channel: 'stable'
cache: true
- name: Create key.properties
run: |
echo keyPassword=\${{ secrets.KEY_PASSWORD }} > ./android/key.properties
echo storePassword=\${{ secrets.KEY_STORE_PASSWORD }} >> ./android/key.properties
echo keyAlias=\${{ secrets.KEY_ALIAS }} >> ./android/key.properties
- name: Load key
run: echo "${{ secrets.KEYSTORE_JKS_RELEASE }}" | base64 --decode > android/app/release-key.jks
- name: Extract version from tag
uses: damienaicheh/[email protected]
- name: Turn off analytics
run: flutter config --no-analytics
- name: Pub Get Packages
run: flutter pub get
- name: Build APPBUNDLE
run: flutter build appbundle --flavor prod
- name: Build APK
run: flutter build apk --release --split-per-abi --flavor prod
- name: Build Changelog
id: github_release
uses: mikepenz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
configurationJson: |
{
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feature"]
},
{
"enhancements": "## ✨ Enhancements"
"labels": ["enhancement"]
},
{
"title": "## 🐛 Fixes",
"labels": ["bug"]
},
{
"key": "tests",
"title": "## 🧪 Tests",
"labels": ["test"]
},
],
}
- name: Create Github Release
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/bundle/release/*.aab,build/app/outputs/flutter-apk/*.apk"
body: ${{steps.github_release.outputs.changelog}}
draft: true