mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +03:00
Create workflow to generate Changelog via Github action
This commit is contained in:
parent
53b6692b33
commit
994884bfe4
34
.github/workflows/changelog.yml
vendored
Normal file
34
.github/workflows/changelog.yml
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user