Skip to content

Commit dc299a9

Browse files
committed
Fix: automate changelog
1 parent f54f8df commit dc299a9

File tree

4 files changed

+49
-10
lines changed

4 files changed

+49
-10
lines changed

.chglog/config.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ info:
44
title: CHANGELOG
55
repository_url: https://github.com/fullstack-devops/awesome-ci
66
options:
7+
sort: "semver"
8+
79
commits:
810
filters:
911
Type:
1012
- feat
11-
- fix
12-
- perf
13-
- refactor
13+
sort_by: Scope
14+
1415
commit_groups:
16+
group_by: Type
17+
sort_by: Title
18+
title_order:
19+
- feat
1520
title_maps:
1621
feat: Features
17-
fix: Bug Fixes
18-
perf: Performance Improvements
19-
refactor: Code Refactoring
22+
2023
header:
2124
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
2225
pattern_maps:
@@ -29,3 +32,4 @@ options:
2932
issues:
3033
prefix:
3134
- bugfix
35+
- fix

.github/workflows/Release.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ on:
1010
- "main"
1111
paths-ignore:
1212
- "docs/**"
13+
- "CHANGELOG.md"
1314

1415
jobs:
1516
create_release:
16-
uses: fullstack-devops/actions/.github/workflows/create-release.yml@main
17+
uses: fullstack-devops/git-workflows/.github/workflows/create-release.yml@main
1718
secrets:
1819
token: ${{ secrets.GITHUB_TOKEN }}
1920

@@ -77,6 +78,25 @@ jobs:
7778
env:
7879
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7980

81+
update_changelog:
82+
runs-on: ubuntu-latest
83+
needs: [create_release, publish_release]
84+
steps:
85+
- name: Checkout code
86+
uses: actions/checkout@v3
87+
88+
- name: update changelog
89+
run: docker run -v "$PWD":/workdir quay.io/git-chglog/git-chglog -o CHANGELOG.md 1.0.0..
90+
91+
- name: git update main
92+
continue-on-error: true
93+
run: |
94+
git config user.name "$GITHUB_ACTOR"
95+
git config user.email "[email protected]"
96+
git status
97+
git commit CHANGELOG.md -m "update CHANGELOG.md"
98+
git push
99+
80100
update_action:
81101
runs-on: ubuntu-latest
82102
needs: [create_release, publish_release]
@@ -93,8 +113,6 @@ jobs:
93113
git config user.name "$GITHUB_ACTOR"
94114
git config user.email "[email protected]"
95115
96-
OLD_VERSION=$(echo "$(git describe --tags)" | tr -d '\n')
97-
98116
sed -i "s/\([0-9]\+\.[0-9]\+\.[0-9]\+\)/$NEW_VERSION/g" action.yml README.md
99117
100118
git status

.github/workflows/branchPR.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
generate_infos:
8-
uses: fullstack-devops/actions/.github/workflows/generate-build-infos.yml@main
8+
uses: fullstack-devops/git-workflows/.github/workflows/generate-build-infos.yml@main
99
secrets:
1010
token: ${{ secrets.GITHUB_TOKEN }}
1111

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<a name="unreleased"></a>
2+
## [Unreleased]
3+
4+
5+
<a name="1.0.1"></a>
6+
## [1.0.1] - 2023-01-13
7+
### Pull Requests
8+
- Merge pull request [#121](https://github.com/fullstack-devops/awesome-ci/issues/121) from fullstack-devops/bugfix/false-release-version
9+
- Merge pull request [#120](https://github.com/fullstack-devops/awesome-ci/issues/120) from fullstack-devops/bugfix/change-to-new-wf
10+
11+
12+
<a name="1.0.0"></a>
13+
## [1.0.0] - 2023-01-12
14+
15+
[Unreleased]: https://github.com/fullstack-devops/awesome-ci/compare/1.0.1...HEAD
16+
[1.0.1]: https://github.com/fullstack-devops/awesome-ci/compare/1.0.0...1.0.1
17+
[1.0.0]: https://github.com/fullstack-devops/awesome-ci/compare/0.13.1...1.0.0

0 commit comments

Comments
 (0)