File tree Expand file tree Collapse file tree 3 files changed +20
-18
lines changed Expand file tree Collapse file tree 3 files changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ name: Changelog CI
3
3
# Controls when the action will run. Triggers the workflow on a pull request
4
4
on :
5
5
pull_request :
6
- # types: [opened, reopened]
6
+ types : [opened, reopened]
7
+ branches :
8
+ - master
7
9
8
10
jobs :
9
11
build :
12
14
steps :
13
15
- uses : actions/checkout@v2
14
16
with :
15
- ref : ${{ github.event.pull_request.head.ref }}
16
17
fetch-depth : 0
17
18
- name : Install Dependency
18
19
run : npm i
19
20
20
- - name : Config Internal Git
21
- run : |
22
- git config --global user.email "action@github.com"
23
- git config --global user.name "GitHub Action"
24
-
25
- - name : Run Changelog CI & Bump npm version
26
- if : ${{ startsWith(github.event.pull_request.title, 'Release') }}
27
- run : npm run generate-changelog
28
-
29
- - name : Copy & Deploy
30
- if : ${{ startsWith(github.event.pull_request.title, 'Release') }}
31
- run : |
32
- git add -A
33
- git commit -m '(Changelog CI) Added Changelog'
34
- git push
21
+ - name : Run Changelog CI
22
+ run : ./scripts/generate-changelog.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ git checkout ${GITHUB_HEAD_REF}
4
+
5
+ git config --global user.email " action@github.com"
6
+ git config --global user.name " GitHub Action"
7
+
8
+ npm run generate-changelog
9
+
10
+ git add -A
11
+ git commit -m " (Changelog CI) Added Changelog"
12
+ git push -u origin ${GITHUB_HEAD_REF} --tags
Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ const category = {
41
41
42
42
commitsArray . forEach ( ( message ) => {
43
43
let cat : keyof typeof category ;
44
- if ( message . includes ( "test" ) ) {
44
+ if ( / ^ ( [ \d \. ] + ) $ / . test ( message ) ) {
45
+ return ;
46
+ } else if ( message . includes ( "test" ) ) {
45
47
cat = "miscs" ;
46
48
} else if ( / ( a d d ) | ( s u p p o r t ) / i. test ( message ) ) {
47
49
cat = "features" ;
You can’t perform that action at this time.
0 commit comments