generated from dymensionxyz/rollapp
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3164576
commit 8ba7c48
Showing
1 changed file
with
17 additions
and
4 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 |
---|---|---|
|
@@ -23,15 +23,28 @@ jobs: | |
with: | ||
node-version: "18" | ||
|
||
- name: Update Changelog | ||
- name: Install conventional-changelog-cli | ||
run: npm install -g conventional-changelog-cli | ||
|
||
- name: Simulate commit for PR title | ||
run: | | ||
# Format PR title as a conventional commit message | ||
echo "${{ github.event.pull_request.title }}" > temp_message.txt | ||
# Temporarily commit this message | ||
git commit --allow-empty -F temp_message.txt | ||
- name: Generate changelog | ||
run: | | ||
echo "### PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" >> CHANGELOG.md | ||
echo "" >> CHANGELOG.md | ||
conventional-changelog -p angular -i CHANGELOG.md -s -r 0 | ||
cat CHANGELOG.md | ||
- name: Revert temporary commit | ||
run: git reset HEAD~ | ||
|
||
- 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 with PR #${{ github.event.pull_request.number }} title" | ||
git commit -m "Update CHANGELOG.md based on PR #${{ github.event.pull_request.number }} title" | ||
git push origin HEAD:refs/heads/${{ github.head_ref }} |