-
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.
- Loading branch information
1 parent
833f5c7
commit 2d4d2c2
Showing
1 changed file
with
20 additions
and
1 deletion.
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 |
---|---|---|
@@ -1,18 +1,37 @@ | ||
name: Generate Changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
changelog: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Step 1: Checkout repository | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Generate the changelog file | ||
- name: Generate Changelog | ||
run: | | ||
git log --pretty=format:"* %h - %s (%an, %ad)" --date=short > CHANGES.md | ||
# Step 3: Debugging to ensure CHANGES.md was created | ||
- name: Debug CHANGES.md | ||
run: cat CHANGES.md || echo "CHANGES.md not created." | ||
|
||
# Step 4: Configure GitHub Actions bot for commits | ||
- name: Configure git | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
# Step 5: Commit and push changes | ||
- name: Commit and push changes | ||
run: | | ||
git add CHANGES.md | ||
git commit -m "Update changelog" | ||
git push |