Skip to content

Update Changelog

Update Changelog #6

name: Update Changelog
on:
release:
types: [published]
jobs:
generate-changelog:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Install github-changelog-generator
run: |
gem install github_changelog_generator
- name: Generate Changelog
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
github_changelog_generator --user konstructio --project konstruct-ui
- name: Extract release version
id: extract_version
run: |
echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and Push Changes
run: |
git fetch origin main
git checkout main
git add CHANGELOG.md
git commit -m "🚀 chore: update changelog for the version ${RELEASE_VERSION}" --no-verify
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}