Skip to content

Commit

Permalink
feat(meta 46): update CI to update CHANGELOG
Browse files Browse the repository at this point in the history
* Update GitHub CI to automatically update CHANGELOG.md on main PR or
  main push using conventional-changelog-cli.
  • Loading branch information
puckowski committed Jan 14, 2025
1 parent ab5c82f commit 2b010da
Show file tree
Hide file tree
Showing 3 changed files with 1,018 additions and 37 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,40 @@ jobs:
run: npx playwright install chromium
- name: Run unit test
run: npm run test

update-changelog:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
# Ensure we can push back to the repo
persist-credentials: true
fetch-depth: 0

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install Dependencies
run: npm ci

- name: Generate Changelog
run: npm run changelog

- name: Commit and Push Changelog
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Check if there are any changes to commit
if [ -n "$(git status --porcelain)" ]; then
git add CHANGELOG.md
git commit -m "chore(release): update CHANGELOG [ci]"
git push
else
echo "No changes to commit."
fi
Loading

0 comments on commit 2b010da

Please sign in to comment.