-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Chore] Update github actions to generate changelog to development br…
…anch - using automated changelog generator github action - using github actions for pushing to development branch
- Loading branch information
1 parent
6611731
commit 3862c2e
Showing
1 changed file
with
12 additions
and
12 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 |
---|---|---|
|
@@ -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 |