-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1.1 KB
/
changelog.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Changelog
on:
pull_request:
branches: [master]
types: [closed]
release:
types: [published]
issues:
types: [closed, edited]
jobs:
generate_changelog:
runs-on: ubuntu-latest
name: Generate changelog for master branch
steps:
- uses: actions/checkout@v1
- name: Generate changelog
uses: charmixer/[email protected]
with:
token: ${{ secrets.CI_TOKEN }}
- name: Commit files
env:
CI_USER: ${{ secrets.CI_USER }}
CI_EMAIL: ${{ secrets.CI_EMAIL }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: |
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.CI_USER }}
CI_TOKEN: ${{ secrets.CI_TOKEN }}
run: |
git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master