Skip to content

ci: move configuration to workflow file #10

ci: move configuration to workflow file

ci: move configuration to workflow file #10

Workflow file for this run

name: create_release.yml
on:
push:
tags:
- "v-**"
permissions:
contents: write
pull-requests: read
jobs:
release:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Get Repository URL
id: get_repo_url
run: echo "REPO_URL=https://github.com/${{ github.repository }}" >> $GITHUB_OUTPUT
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
mode: HYBRID
configurationJson: |
{
"categories": [
{
"title": "## ✨ Next Generation Features & Changes",
"labels": [
"epoch-change"
]
},
{
"title": "## 🚧 Breaking Changes",
"labels": [
"breaking-change"
]
},
{
"title": "## 🚀 Features",
"labels": [
"enhancement",
"feat"
]
},
{
"title": "## 🐛 Fixes",
"labels": [
"fix",
"bug"
]
},
{
"title": "## 🧪 Tests",
"labels": [
"test"
]
},
{
"title": "## 📦 Misc",
"labels": [ ]
}
],
"ignore_labels": [
"skip-changelog"
],
"label_extractor": [
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)",
"target": "$1"
},
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\-\\.]+\\)){1}?(!)?: ([\\w ])+([\\s\\S]*)",
"target": "scope-$1"
},
{
"pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\([\\w\\-\\.]+\\))?!: ([\\w ])+([\\s\\S]*)",
"target": "breaking-change"
},
{
"pattern": "^BREAKING CHANGE:(.*)",
"target": "breaking-change"
},
{
"pattern": "^ignore(\\([\\w\\-\\.]+\\))?: ([\\w ])+([\\s\\S]*)",
"target": "skip-changelog"
}
],
"tag_resolver": {
"method": "sort"
},
"sort": {
"order": "ASC",
"on_property": "mergedAt"
},
"template": "#{{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n#{{UNCATEGORIZED}}\n</details>",
"pr_template": "- #{{TITLE}} (##{{NUMBER}}) - #{{AUTHOR}}",
"commit_template": "- #{{TITLE}} ([`#{{MERGE_SHA}}`](${{steps.get_repo_url.outputs.REPO_URL}}/commit/#{{MERGE_SHA}}))",
"empty_template": "- no changes"
}
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body: ${{steps.github_release.outputs.changelog}}