Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add changelog generator #4

Merged
merged 17 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}