Skip to content

Commit 55b529a

Browse files
committed
add auto chagelog workflow
1 parent f3eab19 commit 55b529a

File tree

2 files changed

+55
-67
lines changed

2 files changed

+55
-67
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: ChangeLog
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/setup-node@v2-beta
15+
with:
16+
node-version: '12'
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Checkout Tool
22+
uses: actions/checkout@v2
23+
with:
24+
repository: konakonall/auto-changelog
25+
path: 'auto-changelog'
26+
- name: Build Tool
27+
run: |
28+
cd auto-changelog
29+
npm install
30+
npm link
31+
32+
- name: Generate ChangeLog
33+
env: # Or as an environment variable
34+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
auto-changelog --token $TOKEN
37+
- name: Cat ChangeLog
38+
run: cat CHANGELOG.md
39+
40+
- name: Commit files
41+
env:
42+
CI_USER: "gouki0123"
43+
CI_EMAIL: "[email protected]"
44+
run: |
45+
git config --local user.email "$CI_EMAIL"
46+
git config --local user.name "$CI_USER"
47+
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo "push=1" >> $GITHUB_ENV || echo "No changes to CHANGELOG.md"
48+
49+
- name: Push changes
50+
if: env.push == 1
51+
env:
52+
CI_USER: "gouki0123"
53+
CI_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
55+
git push "https://$CI_USER:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master

.github/workflows/qunit.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)