Skip to content

Commit

Permalink
Add CI release changelog generator
Browse files Browse the repository at this point in the history
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'.
  • Loading branch information
TheZoker committed Apr 7, 2022
1 parent 1703de6 commit e1aeaf4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/config/changelog.json
@@ -0,0 +1,8 @@
{
"sort": "DESC",
"pr_template": "- [${{LABELS}}] ${{TITLE}} (#${{NUMBER}})",
"template": "${{UNCATEGORIZED}}",
"ignore_labels": [
"dependencies"
]
}
32 changes: 32 additions & 0 deletions .github/workflows/release.yaml
@@ -0,0 +1,32 @@
name: 'Release'
on:
push:
tags:
- '*'

jobs:
release:
if: |
startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref, 'alpha') &&
!contains(github.ref, 'beta') &&
!contains(github.ref, 'rc')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create Changelog
id: create_changelog
uses: mikepenz/release-changelog-builder-action@v2
with:
configuration: ./.github/config/changelog.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.create_changelog.outputs.changelog }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit e1aeaf4

Please sign in to comment.