| 1 | name: release |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | tags: |
| 6 | - 'v*' |
| 7 | |
| 8 | jobs: |
| 9 | release: |
| 10 | if: startsWith(github.ref, 'refs/tags/') |
| 11 | runs-on: ubuntu-latest |
| 12 | steps: |
| 13 | - name: Build Changelog |
| 14 | id: github_release |
| 15 | uses: mikepenz/release-changelog-builder-action@v3 |
| 16 | env: |
| 17 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 18 | with: |
| 19 | configurationJson: | |
| 20 | { |
| 21 | "template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>\n\nIf you find this project useful, please consider [sponsoring](https://github.com/sponsors/wkentaro) its development.", |
| 22 | "pr_template": "- #{{TITLE}} ##{{NUMBER}}", |
| 23 | "categories": [ |
| 24 | { |
| 25 | "title": "## 🚀 Features", |
| 26 | "labels": ["feature"] |
| 27 | }, |
| 28 | { |
| 29 | "title": "## ✨ Enhancement", |
| 30 | "labels": ["enhancement"] |
| 31 | }, |
| 32 | { |
| 33 | "title": "## 🐛 Fixes", |
| 34 | "labels": ["fix"] |
| 35 | }, |
| 36 | { |
| 37 | "title": "## 💬 Other", |
| 38 | "labels": ["other"] |
| 39 | } |
| 40 | ] |
| 41 | } |
| 42 | |
| 43 | - name: Create Release |
| 44 | uses: mikepenz/[email protected] |
| 45 | with: |
| 46 | body: ${{steps.github_release.outputs.changelog}} |