Skip to content

Commit e1aeaf4

Browse files
authored
Add CI release changelog generator
Creates release changelogs on tag pushes. To structure the changelog the labels on the PRs are used. Only create release if tag does not contain 'alpha', 'beta' or 'rc'.
1 parent 1703de6 commit e1aeaf4

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/config/changelog.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"sort": "DESC",
3+
"pr_template": "- [${{LABELS}}] ${{TITLE}} (#${{NUMBER}})",
4+
"template": "${{UNCATEGORIZED}}",
5+
"ignore_labels": [
6+
"dependencies"
7+
]
8+
}

.github/workflows/release.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Release'
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
release:
9+
if: |
10+
startsWith(github.ref, 'refs/tags/v') &&
11+
!contains(github.ref, 'alpha') &&
12+
!contains(github.ref, 'beta') &&
13+
!contains(github.ref, 'rc')
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
- name: Create Changelog
19+
id: create_changelog
20+
uses: mikepenz/release-changelog-builder-action@v2
21+
with:
22+
configuration: ./.github/config/changelog.json
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Create Release
26+
uses: actions/create-release@v1
27+
with:
28+
tag_name: ${{ github.ref }}
29+
release_name: ${{ github.ref }}
30+
body: ${{ steps.create_changelog.outputs.changelog }}
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)