Skip to content

Commit

Permalink
Release job and automatic changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesa2 authored and d4rken committed Jul 11, 2022
1 parent 37d78d7 commit 6ba5975
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"categories": [
{
"title": "## 💡 Features",
"labels": [
"feature",
"enhancement"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## 💬 Maintenance",
"labels": [
"maintenance"
]
}
],
"ignore_labels": [
"dependencies",
"gradle-wrapper"
],
"sort": "ASC",
"template": "${{CHANGELOG}}",
"pr_template": "- ${{TITLE}} #${{NUMBER}}",
"empty_template": "- no changes"
}
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Changelog vs Release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
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@v3
with:
distribution: 'adopt'
java-version: 11
- name: Build project
run: ./gradlew assembleRelease
env:
VERSION: ${{ github.ref }}
- 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: ${{steps.tagger.outputs.tag}}
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 }}

0 comments on commit 6ba5975

Please sign in to comment.