Create workflow to generate Changelog via Github action

This commit is contained in:
Bruno Alla 2020-04-15 09:45:24 +01:00
parent 53b6692b33
commit 994884bfe4

34
.github/workflows/changelog.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Changelog Generator
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate changelog content
uses: heinrichreimer/action-github-changelog-generator@v2.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
run: |
if [ -n "$(git status --short)" ]
then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update Changelog" -a
else
echo "No changes to commit - skipping"
fi
- name: Push
uses: ad-m/github-push-action@v0.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master