[TOOLS] Use git-chglog for changelog
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
{{ range .Versions }}
|
||||
<a name="{{ .Tag.Name }}"></a>
|
||||
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||
|
||||
{{ range .Commits -}}
|
||||
{{ if not (contains .Type "[") }}- {{.Hash.Short}} {{ .Subject }}
|
||||
{{ if not (eq (len .Body) 0) }}{{ .Body }}{{ end }}
|
||||
{{ range .Refs -}}
|
||||
{{ " " }} - #{{ .Ref }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end -}}
|
||||
@@ -0,0 +1,20 @@
|
||||
style: github
|
||||
template: CHANGELOG.tpl.md
|
||||
info:
|
||||
title: CHANGELOG
|
||||
repository_url: https://github.com/uazo/cromite
|
||||
options:
|
||||
commits:
|
||||
filters:
|
||||
Type:
|
||||
- "[AUTO]"
|
||||
commit_groups:
|
||||
# title_maps: []
|
||||
header:
|
||||
pattern: "^(\\[.*\\])?(.*)$"
|
||||
pattern_maps:
|
||||
- Type
|
||||
- Subject
|
||||
notes:
|
||||
keywords:
|
||||
- BREAKING CHANGE
|
||||
@@ -17,11 +17,15 @@ on:
|
||||
description: 'draft? [true/false]'
|
||||
required: true
|
||||
default: 'false'
|
||||
comment:
|
||||
description: 'comment'
|
||||
required: true
|
||||
|
||||
env:
|
||||
CROMITE_SHA: ${{ github.event.inputs.sha }}
|
||||
REMOVEDOCKERSUPPORT: true
|
||||
USELOCALIMAGE: true
|
||||
COMMENT: ${{ github.event.inputs.comment }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -48,9 +52,6 @@ jobs:
|
||||
BRANCH=$(curl https://github.com/uazo/cromite/branch_commits/$CROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
|
||||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
|
||||
|
||||
wget https://github.com/cli/cli/releases/download/v2.18.1/gh_2.18.1_linux_amd64.tar.gz
|
||||
tar xfz gh_2.18.1_linux_amd64.tar.gz
|
||||
|
||||
- name: Checkout 'uazo/cromite'
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -71,10 +72,7 @@ jobs:
|
||||
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | $GH auth login --with-token
|
||||
|
||||
echo "\`\`\`" >note
|
||||
# echo "this is not the official release of bromite but a test version." >>note
|
||||
# echo "you can try it at your own risk." >>note
|
||||
echo "\`\`\`" >>note
|
||||
echo $COMMENT >note
|
||||
|
||||
$GH release create $VERSION-$CROMITE_SHA --notes-file note -d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user