fix: corrected which github action is in use #20
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
name: Update Changelog | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-changelog: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/checkout@v3 | |
with: | |
# Need the full commit history so we can compare commits | |
fetch-depth: 0 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Make script executable | |
run: chmod +x update-changelog.sh | |
- name: Update Changelog | |
run: | | |
./update-changelog.sh | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add src/CHANGELOG.md | |
# Only commit if there are changes | |
if ! git diff --cached --quiet; then | |
git commit -m "chore: update changelog" | |
git push | |
else | |
echo "No changes to commit." | |
fi |