File tree 5 files changed +17
-22
lines changed
5 files changed +17
-22
lines changed Original file line number Diff line number Diff line change 14
14
jobs :
15
15
test :
16
16
name : Test
17
- runs-on : ubuntu-18.04
17
+ runs-on : ubuntu-latest
18
18
strategy :
19
19
matrix :
20
20
node-version : [12.x, 14.x, 16.x]
Original file line number Diff line number Diff line change 6
6
rebase :
7
7
name : Rebase
8
8
if : github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
9
- runs-on : ubuntu-18.04
9
+ runs-on : ubuntu-latest
10
10
steps :
11
11
- name : Checkout the latest code
12
12
uses : actions/checkout@main
Original file line number Diff line number Diff line change 7
7
jobs :
8
8
release :
9
9
name : Create release
10
- runs-on : ubuntu-18.04
10
+ runs-on : ubuntu-latest
11
11
12
12
steps :
13
13
- name : Checkout repo
14
14
uses : actions/checkout@main
15
15
- name : Setup Node.js version
16
16
uses : actions/setup-node@main
17
17
with :
18
- node-version : ' 12.16.1 '
18
+ node-version : 14.x
19
19
20
20
- name : Generate release body
21
21
run : |
22
- yarn extract-latest-change-log
22
+ npx rexreplace "(#+ \[\d+\.\d+\.\d+].*?)#+ \[?\d+\.\d+\.\d+]?" "_" -s -M -G -m -o "CHANGELOG.md" > RELEASE_BODY.md
23
+ result=$(cat RELEASE_BODY.md)
24
+
25
+ if [[ $? != 0 ]]; then
26
+ echo "Command failed."
27
+ exit 1;
28
+ elif [[ $result ]]; then
29
+ echo "Release body generated."
30
+ else
31
+ echo "This is the first release, using different command to generate release body."
32
+ npx rexreplace "(#+ \[?\d+\.\d+\.\d+]?.*)" "_" -s -M -G -m -o "CHANGELOG.md" > RELEASE_BODY.md
33
+ fi
34
+
23
35
- name : Create release
24
36
id : create-release
25
37
uses : actions/create-release@v1
Original file line number Diff line number Diff line change 9
9
"prepare" : " husky install && install-peers" ,
10
10
"first-release" : " npx standard-version --commit-all --tag-prefix v --first-release" ,
11
11
"release" : " npx standard-version --commit-all --tag-prefix v" ,
12
- "extract-latest-change-log" : " node scripts/extractLatestChangeLog.js" ,
13
12
"test" : " jest --verbose --watchAll --config ./jest.config.js" ,
14
13
"test:ci" : " yarn test --ci --watchAll=false --runInBand --detectOpenHandles"
15
14
},
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments