Skip to content

Commit c759568

Browse files
authored
Release notes (#338)
Add changelog and release action
1 parent 5ba7217 commit c759568

File tree

2 files changed

+59
-9
lines changed

2 files changed

+59
-9
lines changed

.github/changelog-configuration.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"categories": [
3+
{
4+
"title": "## 🚀 Features",
5+
"labels": [
6+
"feature",
7+
"enhancement"
8+
]
9+
},
10+
{
11+
"title": "## 🐛 Fixes",
12+
"labels": [
13+
"fix",
14+
"bug"
15+
]
16+
},
17+
{
18+
"title": "## 💬 Maintenance",
19+
"labels": [
20+
"maintenance",
21+
"dependencies",
22+
"gradle-wrapper"
23+
]
24+
}
25+
],
26+
"sort": "ASC",
27+
"template": "${{CHANGELOG}}",
28+
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
29+
"empty_template": "- no changes"
30+
}

.github/workflows/Android-CI-release.yml

+29-9
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,54 @@
1-
name: Release
1+
name: Changelog vs Release
22

33
on:
44
push:
55
tags:
66
- '*'
77

88
jobs:
9-
build:
10-
name: Publish release
9+
release:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout
1413
uses: actions/[email protected]
1514
with:
1615
fetch-depth: 0
16+
17+
- name: Build Changelog
18+
id: github_release
19+
uses: mikepenz/release-changelog-builder-action@main
20+
with:
21+
configuration: ".github/changelog-configuration.json"
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
1725
- name: Install JDK ${{ matrix.java_version }}
1826
uses: actions/setup-java@v1
1927
with:
2028
java-version: 1.8
29+
2130
- name: Install Android SDK
2231
uses: malinskiy/action-android/install-sdk@release/0.1.0
32+
2333
- name: Build project
2434
run: ./gradlew clean build
2535
env:
2636
VERSION: ${{ github.ref }}
27-
- run: |
28-
assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done)
29-
VERSION=$(echo $VERSION | cut -d'/' -f3)
30-
tag_name="${GITHUB_REF##*/}"
31-
hub release create ${assetsAAR} -m "$tag_name" "$tag_name"
37+
38+
- name: Get the version
39+
id: tagger
40+
uses: jimschubert/query-tag-action@v2
41+
with:
42+
skip-unshallow: 'true'
43+
abbrev: false
44+
commit-ish: HEAD
45+
46+
- name: Create Release
47+
uses: softprops/action-gh-release@v1
48+
with:
49+
tag_name: ${{ github.ref }}
50+
name: ${{steps.tagger.outputs.tag}}
51+
body: ${{steps.github_release.outputs.changelog}}
52+
files: touchview/build/outputs/aar/touchview-release.aar
3253
env:
3354
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34-
VERSION: ${{ github.ref }}

0 commit comments

Comments
 (0)