-
-
Notifications
You must be signed in to change notification settings - Fork 19
45 lines (43 loc) · 1.38 KB
/
changelog.yml
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
37
38
39
40
41
42
43
44
45
---
name: Changelog
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 4
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v2.3.4
- name: Set up Ruby
uses: actions/setup-ruby@v1.1.3
with:
ruby-version: 2.7.x
- uses: actions/cache@v2.1.5
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Create local changes
run: |
gem install github_changelog_generator
github_changelog_generator \
-u ${{ github.repository_owner }} \
-p "$(git rev-parse --show-toplevel | xargs basename)" \
-t ${{ secrets.GITHUB_TOKEN }} \
--exclude-labels duplicate,question,invalid,wontfix,nodoc \
--output changelog.md
- name: Commit files
run: |
git config --local user.email "action@github.com" && \
git config --local user.name "GitHub Actions" && \
git add --verbose --all && \
git commit --verbose --message '[ci skip] Updating changelog'
- name: Push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}