From e49e32782fa23ec86e475b1713118b87ab5168bf Mon Sep 17 00:00:00 2001 From: Elias Hackradt Date: Thu, 21 Apr 2022 12:55:33 +0200 Subject: [PATCH] Add github release builder --- .github/workflows/cb.json | 21 +++++++++++++++++ .github/workflows/changelog_builder.yml | 31 +++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/cb.json create mode 100644 .github/workflows/changelog_builder.yml diff --git a/.github/workflows/cb.json b/.github/workflows/cb.json new file mode 100644 index 0000000..d57db9f --- /dev/null +++ b/.github/workflows/cb.json @@ -0,0 +1,21 @@ +{ + "categories": [ + { + "title": "## ๐Ÿš€ Features", + "labels": ["feature"] + }, + { + "title": "## โญ Enhancement", + "labels": ["enhancement"] + }, + { + "title": "## ๐Ÿ› Fixes", + "labels": ["fix", "bug"] + }, + { + "title": "## ๐Ÿงช Tests", + "labels": ["test"] + } + ], + "pr_template": "- ${{TITLE}} - Thanks to @${{AUTHOR}} ๐Ÿ’™\n - PR: #${{NUMBER}}" +} \ No newline at end of file diff --git a/.github/workflows/changelog_builder.yml b/.github/workflows/changelog_builder.yml new file mode 100644 index 0000000..5750f06 --- /dev/null +++ b/.github/workflows/changelog_builder.yml @@ -0,0 +1,31 @@ +name: 'Release and Changelog Builder' +on: + push: + tags: + - '*' + +jobs: + release: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build Changelog + id: github_release + uses: mikepenz/release-changelog-builder-action@v2.9.0 + with: + configuration: ".github/workflows/cb.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create Release + uses: ncipollo/release-action@v1 + with: + tag_name: ${{ github.ref }} + release_name: ${{ github.ref }} + body: ${{steps.github_release.outputs.changelog}} + allowUpdates: true + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}