Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release job and automatic changelog #334

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}