Skip to content

Commit

Permalink
GH action for auto generation of CHANGELOG.md on version tag push (#267)
Browse files Browse the repository at this point in the history
* GH action for updating changelog on version tag push
  • Loading branch information
montehurd authored Apr 5, 2024
1 parent 1766869 commit 1af5e7d
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Update Changelog

on:
push:
tags:
- '*'

permissions:
contents: write

jobs:
update-changelog:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '21'

- name: Install auto-changelog
run: npm install -g auto-changelog

- name: Generate changelog
run: auto-changelog

- name: Commit and push changes
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
git add CHANGELOG.md
git commit -m "Update changelog"
git push origin HEAD:main

0 comments on commit 1af5e7d

Please sign in to comment.