forked from dymensionxyz/dymint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): Add changelog workflow (dymensionxyz#720)
Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
6bc6c97
commit 6361f97
Showing
2 changed files
with
351 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This workflow will add a changelog to the repository when a new commit is pushed to the main branch. | ||
# E.g., manually edit the commit message to align with conventional commit messages, such as: | ||
# feat(database): add new indexing capabilities | ||
# This update introduces advanced indexing options for handling complex queries more efficiently. | ||
|
||
name: Changelog Update | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [opened, synchronize, reopened] | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
update_changelog: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "18" | ||
|
||
- name: Install conventional-changelog-cli | ||
run: npm install -g conventional-changelog-cli | ||
|
||
- name: Generate changelog diff | ||
run: | | ||
git fetch origin main:main | ||
conventional-changelog -p angular -i CHANGELOG.md -s -r 0 > changelog_diff.md | ||
echo "::set-output name=changelog::$(cat changelog_diff.md)" | ||
- name: Commit and push changelog update | ||
run: | | ||
git config user.name 'github-actions' | ||
git config user.email '[email protected]' | ||
git add CHANGELOG.md | ||
git commit -m "Update CHANGELOG.md [skip ci]" | ||
git push origin HEAD:refs/heads/${{ github.head_ref }} |
Oops, something went wrong.