diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0de3ba6..bd3ed48 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -86,14 +86,48 @@ jobs: git tag -a "api/${{ env.version }}" -m "Release ${{ env.version }}" git push origin "api/${{ env.version }}" + - name: Build Changelog + id: github_release + uses: mikepenz/release-changelog-builder-action@v5 + with: + mode: "PR" + configurationJson: | + { + "template": "#{{CHANGELOG}}", + "pr_template": "- #{{TITLE}}: ##{{NUMBER}}", + "categories": [ + { + "title": "## Feature", + "labels": ["feat", "feature"] + }, + { + "title": "## Fix", + "labels": ["fix", "bug"] + }, + { + "title": "## Other", + "labels": [] + } + ], + "label_extractor": [ + { + "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", + "on_property": "title", + "target": "$1" + } + ] + } + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub release if: ${{ env.SKIP != 'true' }} uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.version }} name: Release ${{ env.version }} - body: "Automated release for version ${{ env.version }}" - draft: false + body: ${{steps.github_release.outputs.changelog}} + draft: true prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}