Skip to content

Commit

Permalink
Merge pull request #4 from weaveworks/WKP-1914/add-changelog-generator
Browse files Browse the repository at this point in the history
add changelog generator
  • Loading branch information
jrryjcksn authored Mar 24, 2021
2 parents 87384bf + 26e0781 commit 0651eca
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 4 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/changelog-ci-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"header_prefix": "Version:",
"commit_changelog": true,
"pull_request_title_regex": ".*",
"group_config": [
{
"title": "Bug Fixes",
"labels": ["bug", "bugfix"]
},
{
"title": "Code Improvements",
"labels": ["improvements", "enhancement"]
},
{
"title": "New Features",
"labels": ["feature"]
},
{
"title": "Documentation Updates",
"labels": ["docs", "documentation", "doc"]
}
]
}
23 changes: 23 additions & 0 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: changelog

on:
release:
types: [published]

jobs:
generate-changelog:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create changelog
env:
CHANGELOG_GITHUB_TOKEN: "${{ secrets.CHANGELOG_CREATION_TOKEN }}"
run: |
git config user.name github-actions
git config user.email [email protected]
docker run --rm -v "${GITHUB_WORKSPACE}":"/usr/local/src/your-app" ferrarimarco/github-changelog-generator -u weaveworks -p weave-gitops
git add .
git commit -m "Created changelog"
git push origin HEAD:master
13 changes: 10 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
package main

import "fmt"
import (
"fmt"
)

func main() {
fmt.Println("Hello World!")
}

func test() string {
return "test"
a := 1
w := 1
x := 6
y := 28
z := 496
q := 8128
return fmt.Sprintf("%s:%d", "test", a*w*x*y*z*q)
}
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (

func TestMain(t *testing.T) {
result := test()
require.Equal(t, "test", result)
require.Equal(t, "test:677289984", result)
}

0 comments on commit 0651eca

Please sign in to comment.