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
33# Controls when the action will run. Triggers the workflow on a pull request
44on :
55 pull_request :
6- # types: [opened, reopened]
6+ types : [opened, reopened]
7+ branches :
8+ - master
79
810jobs :
911 build :
1214 steps :
1315 - uses : actions/checkout@v2
1416 with :
15- ref : ${{ github.event.pull_request.head.ref }}
1617 fetch-depth : 0
1718 - name : Install Dependency
1819 run : npm i
1920
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 = {
4141
4242commitsArray . forEach ( ( message ) => {
4343 let cat : keyof typeof category ;
44- if ( message . includes ( "test" ) ) {
44+ if ( / ^ ( [ \d \. ] + ) $ / . test ( message ) ) {
45+ return ;
46+ } else if ( message . includes ( "test" ) ) {
4547 cat = "miscs" ;
4648 } else if ( / ( a d d ) | ( s u p p o r t ) / i. test ( message ) ) {
4749 cat = "features" ;
You can’t perform that action at this time.
0 commit comments