Skip to content

Commit 65d047c

Browse files
Merge pull request #2132 from kristof-mattei/better-changelog
feat: add the self-referencing commit too
2 parents 0749625 + 3b18cba commit 65d047c

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/release.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,15 @@ jobs:
112112
version=$(git-cliff --bumped-version --unreleased --github-token ${{ secrets.GITHUB_TOKEN }})
113113
echo "version=$version" >> ${GITHUB_OUTPUT}
114114
115-
git tag $version --message "chore(version): Release ${version}"
115+
commit_message="chore(release): Release ${version}"
116+
117+
git-cliff --output CHANGELOG.md --bump --with-commit "${commit_message}" --github-token ${{ secrets.GITHUB_TOKEN }}
118+
119+
git add CHANGELOG.md
120+
121+
git commit --message "${commit_message}"
122+
123+
git tag $version --message "${commit_message}"
116124
117125
git push --follow-tags
118126
@@ -124,14 +132,3 @@ jobs:
124132
body_path: diff-CHANGELOG.md
125133
tag_name: ${{ steps.release.outputs.version }}
126134
token: ${{ secrets.TOKEN_TO_TRIGGER_SUBSEQUENT_WORKFLOWS }}
127-
128-
- name: Update changelog
129-
shell: bash
130-
run: |
131-
git-cliff --output CHANGELOG.md --github-token ${{ secrets.GITHUB_TOKEN }}
132-
133-
git add CHANGELOG.md
134-
135-
git commit --message "chore(version): Publish changelog for ${{ steps.release.outputs.version }}"
136-
137-
git push

0 commit comments

Comments
 (0)