-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update CHANGELOG.md * Add an auto changelog workflow.
- Loading branch information
Showing
2 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Changelog | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
generate_changelog: | ||
runs-on: ubuntu-latest | ||
name: Generate changelog for master branch | ||
steps: | ||
- uses: actions/checkout@v1 | ||
|
||
- name: Generate changelog | ||
uses: charmixer/auto-changelog-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Commit files | ||
env: | ||
CI_USER: ${{ secrets.YOUR_GITHUB_USER }} | ||
CI_EMAIL: ${{ secrets.YOUR_GITHUB_EMAIL }} | ||
run: | | ||
git checkout update-changelog | ||
git merge master | ||
git config --local user.email "$CI_EMAIL" | ||
git config --local user.name "$CI_USER" | ||
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md" | ||
- name: Push changes | ||
if: env.push == 1 | ||
env: | ||
CI_USER: ${{ secrets.YOUR_GITHUB_USER }} | ||
CI_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:update-changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters