Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(meta 46): update CI to update CHANGELOG #4310

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,41 @@ jobs:
run: npx playwright install chromium
- name: Run unit test
run: npm run test

update-changelog:
if: ${{ github.event_name == 'push' && contains(join(github.event.commits.*.message, ' '), 'Release v') }}
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 origin HEAD:master
else
echo "No changes to commit."
fi
Loading
Loading