-
-
Notifications
You must be signed in to change notification settings - Fork 7
128 lines (119 loc) · 4.23 KB
/
release-builder.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Release Builder
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
release:
name: Release Builder
runs-on: ubuntu-latest
steps:
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
failOnError: true
commitMode: true
configurationJson: |
{
"template": "#{{CHANGELOG}}<hr>\n\n<h3>Facts</h3>\n\n- <b>Number of commits</b>: #{{COMMITS}}\n- <b>Number of changed files</b>: #{{CHANGED_FILES}}\n- <b>Added lines</b>: #{{ADDITIONS}}\n- <b>Deleted lines</b>: #{{DELETIONS}}\n<hr>\n\nChangelog auto-generated by <a href='https://github.com/mikepenz/release-changelog-builder-action'>Release Changelog Builder Action (Mike Penz)</a>.\nRelease auto-created by <a href='https://github.com/softprops/action-gh-release'>action gh-release (Doug Tangren)</a>.",
"pr_template": "#{{TITLE}} (#{{MERGE_SHA}})",
"base_branches": ["main"],
"tag_resolver": {
"method": "sort"
},
"categories": [
{
"title": "## 🚀 Features",
"labels": ["feat"]
},
{
"title": "## 🐛 Fixes",
"labels": ["fix"]
},
{
"title": "## 🦾 Enhancements",
"labels": ["enh"]
},
{
"title": "## 🧹 Refactorings",
"labels": ["rfct"]
},
{
"title": "## ⚒️ Build / Dependencies",
"labels": ["build"]
},
{
"title": "## ⚙️ CI",
"labels": ["ci"]
},
{
"title": "## 📦 Repository",
"labels": ["repo"]
},
{
"title": "## 💬 Other",
"labels": ["other"]
},
{
"title": "## ❔ Uncategorized",
"labels": []
}
],
"label_extractor": [
{
"pattern": "(.+):(.+)",
"target": "$1",
"on_property": "title"
}
],
"transformers": [
{
"pattern": "(.+):(.+)",
"target": "-$2"
}
]
}
- name: Echo Changelog
env:
CHANGELOG: ${{ steps.github_release.outputs.changelog }}
run: echo "$CHANGELOG"
- name: Checkout repo including backpack submodule
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Show backpack directory
run: |
cd backpack-apps
ls
cd ..
- name: Set release name
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Build APK
run: |
export KEYSTORE_FILE=$(pwd)/keystore.jks
echo $KEYSTORE | base64 -d > $KEYSTORE_FILE
chmod +x ./gradlew
./gradlew -Psign build --stacktrace
cp app/build/outputs/apk/release/app-release.apk app/build/outputs/apk/release/PINcredible-$RELEASE_VERSION.apk
env:
KEYSTORE: ${{ secrets.KEYSTORE }}
KEYSTORE_PASSWD: ${{ secrets.KEYSTORE_PASSWD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWD: ${{ secrets.KEYSTORE_KEY_PASSWD }}
- name: List build output
run: |
cd app/build/outputs/apk/release/
ls
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: "Version ${{ env.RELEASE_VERSION }}"
body: ${{steps.github_release.outputs.changelog}}
files: app/build/outputs/apk/release/PINcredible-${{env.RELEASE_VERSION}}.apk