Skip to content

Commit

Permalink
Release notes (#338)
Browse files Browse the repository at this point in the history
Add changelog and release action
  • Loading branch information
hannesa2 committed Mar 28, 2021
1 parent 5ba7217 commit c759568
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 9 deletions.
30 changes: 30 additions & 0 deletions .github/changelog-configuration.json
@@ -0,0 +1,30 @@
{
"categories": [
{
"title": "## 🚀 Features",
"labels": [
"feature",
"enhancement"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## 💬 Maintenance",
"labels": [
"maintenance",
"dependencies",
"gradle-wrapper"
]
}
],
"sort": "ASC",
"template": "${{CHANGELOG}}",
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
"empty_template": "- no changes"
}
38 changes: 29 additions & 9 deletions .github/workflows/Android-CI-release.yml
@@ -1,34 +1,54 @@
name: Release
name: Changelog vs Release

on:
push:
tags:
- '*'

jobs:
build:
name: Publish release
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0

- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@main
with:
configuration: ".github/changelog-configuration.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install JDK ${{ matrix.java_version }}
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Install Android SDK
uses: malinskiy/action-android/install-sdk@release/0.1.0

- name: Build project
run: ./gradlew clean build
env:
VERSION: ${{ github.ref }}
- run: |
assetsAAR=$(find . -name *release.aar | while read -r asset ; do echo "-a $asset" ; done)
VERSION=$(echo $VERSION | cut -d'/' -f3)
tag_name="${GITHUB_REF##*/}"
hub release create ${assetsAAR} -m "$tag_name" "$tag_name"

- name: Get the version
id: tagger
uses: jimschubert/query-tag-action@v2
with:
skip-unshallow: 'true'
abbrev: false
commit-ish: HEAD

- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: ${{steps.tagger.outputs.tag}}
body: ${{steps.github_release.outputs.changelog}}
files: touchview/build/outputs/aar/touchview-release.aar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref }}

0 comments on commit c759568

Please sign in to comment.