Skip to content

Commit

Permalink
[Chore] Update github actions to generate changelog to development br…
Browse files Browse the repository at this point in the history
…anch

- using automated changelog generator github action
- using github actions for pushing to development branch
  • Loading branch information
rpbaltazar committed Jul 17, 2020
1 parent 6611731 commit 3862c2e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ jobs:
runs-on: ubuntu-latest
name: Generate changelog for master branch
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

- name: Generate changelog
uses: charmixer/auto-changelog-action@v1
with:
token: ${{ secrets.YOUR_GITHUB_TOKEN or GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Commit files
env:
CI_USER: ${{ secrets.YOUR_GITHUB_USER }}
CI_EMAIL: ${{ secrets.YOUR_GITHUB_EMAIL }}
ACTION_EMAIL: [email protected]
ACTION_USERNAME: GitHub Action
run: |
git config --local user.email "$CI_EMAIL"
git config --local user.name "$CI_USER"
git config --local user.email "$ACTION_EMAIL"
git config --local user.name "$ACTION_USERNAME"
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.YOUR_GITHUB_TOKEN or GITHUB_TOKEN }}
run: |
git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }}
branch: development

0 comments on commit 3862c2e

Please sign in to comment.