mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-05 23:07:42 -05:00
Add release changelog builder
This commit is contained in:
185
.github/workflows/changelog_builder.yml
vendored
Normal file
185
.github/workflows/changelog_builder.yml
vendored
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
name: 📜 Changelog Builder
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- redot-*
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
env:
|
||||||
|
STABLE_SINCE_REDOT_VERSION: 4.4
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prepare-release:
|
||||||
|
name: Prepare Release
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Build Changelog
|
||||||
|
id: build_changelog
|
||||||
|
uses: mikepenz/release-changelog-builder-action@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
configurationJson: |
|
||||||
|
{
|
||||||
|
"base_branches": ["master", "4.3", "4.4"],
|
||||||
|
"custom_placeholders": [
|
||||||
|
{
|
||||||
|
"name": "RELEASE_VERSION",
|
||||||
|
"source": "TO_TAG",
|
||||||
|
"transformer": {
|
||||||
|
"method": "regexr",
|
||||||
|
"pattern": "redot-(\\d+\\.\\d+(?:\\.\\d+)?)-(?:(alpha|beta|rc)\\.(\\d+)|(stable))",
|
||||||
|
"target": "$1 $2$4 $3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SIMPLIFIED_TITLE",
|
||||||
|
"source": "TITLE",
|
||||||
|
"transformer": {
|
||||||
|
"pattern": "^(\\[\\d+\\.\\d+\\] )",
|
||||||
|
"target": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"title": "### Enhancements & Features",
|
||||||
|
"labels": ["enhancement"],
|
||||||
|
"exhaustive": true,
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(?!(\\[\\d+\\.\\d+\\] )?Cherry-picks.*)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Bug Fixes",
|
||||||
|
"labels": ["bug"],
|
||||||
|
"exhaustive": true,
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(?!(\\[\\d+\\.\\d+\\] )?Cherry-picks.*)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Cherry-picks",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(\\[\\d+\\.\\d+\\] )?Cherry-picks"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"on_property": "body",
|
||||||
|
"pattern": "\\(cherry picked from commit "
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Godot Syncs",
|
||||||
|
"labels": ["merge:godot"],
|
||||||
|
"consume": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"template": "## Release Notes for Redot #{{RELEASE_VERSION}}\nWe're excited to announce the release of our latest version, featuring a host of enhancements and fixes. Here's what's new:\n\n#{{CHANGELOG}}\n**Full Changelog**: #{{RELEASE_DIFF}}",
|
||||||
|
"pr_template": "* #{{SIMPLIFIED_TITLE}} by #{{AUTHOR}} in #{{URL}}",
|
||||||
|
"max_pull_requests": 1000,
|
||||||
|
"max_back_track_time_days": 365
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Build Stable Changelog
|
||||||
|
if: endsWith(github.ref, '-stable')
|
||||||
|
id: build_stable_changelog
|
||||||
|
uses: mikepenz/release-changelog-builder-action@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
fromTag: redot-${{env.STABLE_SINCE_REDOT_VERSION}}-stable
|
||||||
|
configurationJson: |
|
||||||
|
{
|
||||||
|
"base_branches": ["master"],
|
||||||
|
"custom_placeholders": [
|
||||||
|
{
|
||||||
|
"name": "RELEASE_VERSION",
|
||||||
|
"source": "TO_TAG",
|
||||||
|
"transformer": {
|
||||||
|
"method": "regexr",
|
||||||
|
"pattern": "redot-(\\d+\\.\\d+(?:\\.\\d+)?)-(?:(alpha|beta|rc)\\.(\\d+)|(stable))",
|
||||||
|
"target": "$1 $2$4 $3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SIMPLIFIED_TITLE",
|
||||||
|
"source": "TITLE",
|
||||||
|
"transformer": {
|
||||||
|
"pattern": "^(\\[\\d+\\.\\d+\\] )",
|
||||||
|
"target": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"title": "### Enhancements & Features",
|
||||||
|
"labels": ["enhancement"],
|
||||||
|
"exhaustive": true,
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(?!(\\[\\d+\\.\\d+\\] )?Cherry-picks.*)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Bug Fixes",
|
||||||
|
"labels": ["bug"],
|
||||||
|
"exhaustive": true,
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(?!(\\[\\d+\\.\\d+\\] )?Cherry-picks.*)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Cherry-picks",
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"on_property": "title",
|
||||||
|
"pattern": "^(\\[\\d+\\.\\d+\\] )?Cherry-picks"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"on_property": "body",
|
||||||
|
"pattern": "\\(cherry picked from commit "
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"consume": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "### Godot Syncs",
|
||||||
|
"labels": ["merge:godot"],
|
||||||
|
"consume": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"template": "## Since Redot ${{env.STABLE_SINCE_REDOT_VERSION}}\n\n#{{CHANGELOG}}\n**Full Changelog**: #{{RELEASE_DIFF}}",
|
||||||
|
"pr_template": "* #{{SIMPLIFIED_TITLE}} by #{{AUTHOR}} in #{{URL}}",
|
||||||
|
"max_pull_requests": 1000,
|
||||||
|
"max_back_track_time_days": 365
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Create Release Draft
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
body: |
|
||||||
|
${{steps.build_changelog.outputs.changelog}}
|
||||||
|
${{steps.build_stable_changelog.outputs.changelog}}
|
||||||
|
draft: true
|
||||||
Reference in New Issue
Block a user