Skip to content

Merge pull request #7 from NextStd/error/add_ns_error #12

Merge pull request #7 from NextStd/error/add_ns_error

Merge pull request #7 from NextStd/error/add_ns_error #12

Workflow file for this run

on:
push:
branches: [ "main" ]
# We need to give the bot permission to push commits to your repo
permissions:
contents: write
jobs:
update-changelog:
name: Update CHANGELOG.md
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@main
id: git-cliff
with:
config: cliff.toml
args: -vv
env:
OUTPUT: CHANGELOG.md # This forces git-cliff to write to the file
GITHUB_REPO: ${{ github.repository }}
- name: Commit and push changes
run: |
# Set up the GitHub Actions bot git identity
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
# Add the updated file
git add CHANGELOG.md
# Commit the changes (the || exit 0 prevents the workflow from failing if there are no changes)
git commit -m "chore(changelog): update CHANGELOG.md for ${{ github.ref_name }} [skip ci]" || exit 0
# Push the commit back to the branch
git push origin HEAD:main