Skip to content

Commit

Permalink
feat: Add changelog generator (#43)
Browse files Browse the repository at this point in the history
* feat: Add changelog generator

closes #42

* chore: update labeling

* fix: spelling error
  • Loading branch information
gordsport authored Jun 5, 2022
1 parent e7e587c commit 445a4ae
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---


name: 'Change Log'
"on":
push:
tags:
- '*'

jobs:
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v2

- name: "Build Changelog"
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
with:
configuration: "config/changelogconfig.json"
ignorePreReleases: "true"
fromTag: "0.0.1"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 'Create Release'
uses: actions/create-release@v3
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{steps.github_release.outputs.changelog}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71 changes: 71 additions & 0 deletions .github/workflows/config/changelogconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"categories": [
{
"title": "## 🚨 Breaking Changes",
"labels": ["breaking"]
},
{
"title": "## 🚀 Features",
"labels": ["enhancement"]
},
{
"title": "## 🐛 Fixes",
"labels": ["bug"]
},
{
"title": "## 🧪 Tests",
"labels": ["tests"]
},
{
"title": "## 🪄 Magic",
"labels": ["mega", "magic"],
"exhaustive": true,
}
],
"ignore_labels": [
"wontfix", "no-issue", "duplicate"
],
"sort": {
"order": "ASC",
"on_property": "mergedAt"
},
"template": "${{CHANGELOG}}\n\n<details>\n<summary>Uncategorized</summary>\n\n${{UNCATEGORIZED}}\n</details>",
"pr_template": "- ${{TITLE}}\n - PR: #${{NUMBER}}",
"empty_template": "- no changes",
"label_extractor": [
{
"pattern": "(.) (.+)",
"target": "$1",
"flags": "gu"
},
{
"pattern": "\\[Issue\\]",
"on_property": "title",
"method": "match"
}
],
"duplicate_filter": {
"pattern": "\\[ABC-....\\]",
"on_property": "title",
"method": "match"
},
"transformers": [
{
"pattern": "[\\-\\*] (\\[(...|TEST|CI|SKIP)\\])( )?(.+?)\n(.+?[\\-\\*] )(.+)",
"target": "- $4\n - $6"
}
],
"max_tags_to_fetch": 200,
"max_pull_requests": 200,
"max_back_track_time_days": 365,
"tag_resolver": {
"method": "semver",
"filter": {
"pattern": "api-(.+)",
"flags": "gu"
}
},
"base_branches": [
"main"
]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

You can find a detailed change log in the [release section](https://github.com/theteamworks/project-board-automation/releases)
1 change: 1 addition & 0 deletions wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Changelog
GitHub
GraphQL
WIP

0 comments on commit 445a4ae

Please sign in to comment.