Add auto realease creation

This commit is contained in:
SebClem 2024-09-11 14:56:16 +02:00
parent c68836e8f7
commit aab31a5edb
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
3 changed files with 44 additions and 27 deletions

View File

@ -1,6 +1,5 @@
{ {
"output": "stdout",
"template": ".github/changlog_template.hbs", "template": ".github/changlog_template.hbs",
"unreleased": true, "unreleased": true,
"commitLimit": false "commitLimit": false
} }

View File

@ -1,5 +1,26 @@
{{#each releases}} {{#each releases}}
{{#if @first}} {{#if @first}}
{{#if href}}
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
{{else}}
## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
{{/if}}
{{#commit-list commits heading='## 💥 Breaking changes' message=':boom:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "fix" "true"}}
{{/commit-list}}
{{#unless @root.fix }}
{{#commit-list merges heading='## 💥 Breaking changes' message=':boom:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}}
{{/unless}}
{{#if @root.fix }}
{{#commit-list merges heading='' message=':boom:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}}
{{/if}}
{{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:'}} {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "fix" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "fix" "true"}}
{{/commit-list}} {{/commit-list}}
@ -15,39 +36,21 @@
{{/if}} {{/if}}
{{#commit-list commits heading='## ✏️ Other changes' exclude=':boom:|:ambulance:|:heavy_plus_sign:'}}
{{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "change" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "change" "true"}}
{{/commit-list}} {{/commit-list}}
{{#unless @root.change }} {{#unless @root.change }}
{{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} {{#commit-list merges heading='## ✏️ Other changes' exclude=':boom:|:ambulance:|:heavy_plus_sign:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}` - {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}} {{/commit-list}}
{{/unless}} {{/unless}}
{{#if @root.change }} {{#if @root.change }}
{{#commit-list merges heading='' message=':hammer:|:heavy_plus_sign:'}} {{#commit-list merges heading='' exclude=':boom:|:ambulance:|:heavy_plus_sign:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}` - {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}} {{/commit-list}}
{{/if}} {{/if}}
{{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "enhanc" "true"}}
{{/commit-list}}
{{#unless @root.enhanc }}
{{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}}
{{/unless}}
{{#if @root.enhanc }}
{{#commit-list merges heading='' message=':pencil2:'}}
- {{message}} [`{{id}}`]({{href}}) `{{author}}`
{{/commit-list}}
{{/if}}
{{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}} {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}}
- {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "dep" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "dep" "true"}}
{{/commit-list}} {{/commit-list}}

View File

@ -186,7 +186,7 @@ jobs:
done done
cosign sign --yes ${images} cosign sign --yes ${images}
update_main_ha_repository: update_branch_ha_repository:
name: Update HA addon repository name: Update HA addon repository
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
@ -248,3 +248,18 @@ jobs:
git add . git add .
git commit -m "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}" git commit -m "Update Nextcloud Backup to ${{ steps.branch-names.outputs.current_branch }}.${{ github.run_number }}"
git push git push
draft-release:
name: Draft release
runs-on: ubuntu-latest
needs:
- build-dockers
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Get changelog
run: npx auto-changelog --handlebars-setup .github/custom-handlebars.js
- name: Create release
uses: softprops/action-gh-release@v2
with:
body: CHANGELOG.md
draft: true