Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaizzy committed Jul 16, 2024
1 parent acb6f51 commit 94abf48
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/update_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,30 @@ jobs:
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout ${{ github.head_ref || github.ref_name }}
# Print current directory and list files
pwd
ls -la
# Print Git status and current branch
git status
git branch
# Ensure we're on the correct branch
if [ "${{ github.event_name }}" = "pull_request" ]; then
git checkout -b ${{ github.head_ref }}
else
git checkout ${{ github.ref_name }}
fi
# Run the update script
python update_changelog.py
# Check for changes and commit if necessary
git add docs/changelog.md
git commit -m "Update changelog for latest release" || echo "No changes to commit"
git push
if [[ -n $(git status --porcelain) ]]; then
echo "Changelog was updated. Script is working correctly."
if git diff --staged --quiet; then
echo "No changes to commit"
else
echo "No changes to changelog. Please check if this is expected."
git commit -m "Update changelog for latest release"
git push origin HEAD:${{ github.head_ref || github.ref_name }}
fi
update-changelog:
if: github.event_name == 'release'
runs-on: ubuntu-latest
Expand Down

0 comments on commit 94abf48

Please sign in to comment.