From 966342f2da43e9995ac96a25837f4f999e693c10 Mon Sep 17 00:00:00 2001 From: NiceTSY <38940602+NiceTSY@users.noreply.github.com> Date: Tue, 12 Dec 2023 11:38:16 +0100 Subject: [PATCH 1/2] first draft of changelog builder --- .../release-changelog-builder-action.json | 63 +++++++++++++++++++ .github/workflows/changelog-builder.yml | 27 ++++++++ 2 files changed, 90 insertions(+) create mode 100644 .github/configs/release-changelog-builder-action.json create mode 100644 .github/workflows/changelog-builder.yml diff --git a/.github/configs/release-changelog-builder-action.json b/.github/configs/release-changelog-builder-action.json new file mode 100644 index 000000000..1c21fe806 --- /dev/null +++ b/.github/configs/release-changelog-builder-action.json @@ -0,0 +1,63 @@ +{ + "categories": [ + { + "title": "### Guide - Features", + "labels": ["type: enhancement", "type: guide request"], + "exhaustive": true + }, + { + "title": "### Guide - Fixes", + "labels": ["type: bug"], + "exclude_labels": ["status: non issue"] + }, + { + "title": "### Guide - Updates", + "labels": ["status: confirmed"] + }, + { + "title": "### Radarr - Features", + "labels": ["area: radarr", "type: enhancement"], + "exhaustive": true + }, + { + "title": "### Radarr - Fixes", + "labels": ["area: radarr", "type: bug"], + "exclude_labels": ["status: non issue"], + "exhaustive": true + }, + { + "title": "### Radarr - Updates", + "labels": ["area: radarr"] + }, + { + "title": "### Sonarr - Features", + "labels": ["area: sonarr", "type: enhancement"], + "exhaustive": true + }, + { + "title": "### Sonarr - Fixes", + "labels": ["area: sonarr", "type: bug"], + "exclude_labels": ["status: non issue"], + "exhaustive": true + }, + { + "title": "### Sonarr - Updates", + "labels": ["area: sonarr"] + }, + { + "title": "### Others", + "labels": [] + } + ], + "ignore_labels": ["status: declined"], + "sort": { + "order": "ASC", + "on_property": "title" + }, + "template": "${{CHANGELOG}}\n${{UNCATEGORIZED}}", + "pr_template": "- [${{TITLE}}](${{URL}})", + "empty_template": "- no changes", + "base_branches": [ + "main" + ] +} diff --git a/.github/workflows/changelog-builder.yml b/.github/workflows/changelog-builder.yml new file mode 100644 index 000000000..f00e97872 --- /dev/null +++ b/.github/workflows/changelog-builder.yml @@ -0,0 +1,27 @@ +name: Release Creation + +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + # Build the changelog + - name: Build Changelog + id: build_changelog + uses: mikepenz/release-changelog-builder-action@v4 + with: + configuration: ".github/configs/release-changelog-builder-action.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Change the update file + - name: Modify updates.txt + uses: jaywcjlove/github-action-modify-file-content@main + with: + path: docs\updates.txt + body: "{{date:YYYY-MM-DD HH:mm}}\n${{ steps.github_release.outputs.changelog }}" From e9684d4f375564f2ca975764ccf6bce41f7ede67 Mon Sep 17 00:00:00 2001 From: NiceTSY <38940602+NiceTSY@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:45:46 +0100 Subject: [PATCH 2/2] yamlint fixes --- .github/workflows/changelog-builder.yml | 34 ++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/changelog-builder.yml b/.github/workflows/changelog-builder.yml index f00e97872..509d52252 100644 --- a/.github/workflows/changelog-builder.yml +++ b/.github/workflows/changelog-builder.yml @@ -1,6 +1,6 @@ name: Release Creation -on: +on: release: types: [published] @@ -8,20 +8,20 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - # Build the changelog - - name: Build Changelog - id: build_changelog - uses: mikepenz/release-changelog-builder-action@v4 - with: - configuration: ".github/configs/release-changelog-builder-action.json" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 - # Change the update file - - name: Modify updates.txt - uses: jaywcjlove/github-action-modify-file-content@main - with: - path: docs\updates.txt - body: "{{date:YYYY-MM-DD HH:mm}}\n${{ steps.github_release.outputs.changelog }}" + # Build the changelog + - name: Build Changelog + id: build_changelog + uses: mikepenz/release-changelog-builder-action@v4 + with: + configuration: ".github/configs/release-changelog-builder-action.json" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Change the update file + - name: Modify updates.txt + uses: jaywcjlove/github-action-modify-file-content@main + with: + path: docs\updates.txt + body: "{{date:YYYY-MM-DD HH:mm}}\n${{ steps.github_release.outputs.changelog }}"