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..509d52252 --- /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 }}"