diff --git a/.github/workflows/changelog-ci-config.json b/.github/workflows/changelog-ci-config.json new file mode 100644 index 0000000000..aac8c1ff47 --- /dev/null +++ b/.github/workflows/changelog-ci-config.json @@ -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"] + } + ] +} diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000000..2493cba738 --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -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 github-actions@github.com + 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 + diff --git a/main.go b/main.go index cfd93f7c31..c0ea84f071 100644 --- a/main.go +++ b/main.go @@ -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) } diff --git a/main_test.go b/main_test.go index def83402d0..522f317d67 100644 --- a/main_test.go +++ b/main_test.go @@ -8,5 +8,5 @@ import ( func TestMain(t *testing.T) { result := test() - require.Equal(t, "test", result) + require.Equal(t, "test:677289984", result) }