Skip to content

Commit 455df7d

Browse files
authored
Merge pull request #285 from icelam/ci/v1/update-ci-image
ci: update ci to use latest ubuntu image
2 parents efcf068 + 2fd971a commit 455df7d

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
test:
1616
name: Test
17-
runs-on: ubuntu-18.04
17+
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
2020
node-version: [12.x, 14.x, 16.x]

.github/workflows/rebase.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
rebase:
77
name: Rebase
88
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout the latest code
1212
uses: actions/checkout@main

.github/workflows/release.yml

+15-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,31 @@ on:
77
jobs:
88
release:
99
name: Create release
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111

1212
steps:
1313
- name: Checkout repo
1414
uses: actions/checkout@main
1515
- name: Setup Node.js version
1616
uses: actions/setup-node@main
1717
with:
18-
node-version: '12.16.1'
18+
node-version: 14.x
1919

2020
- name: Generate release body
2121
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+
2335
- name: Create release
2436
id: create-release
2537
uses: actions/create-release@v1

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"prepare": "husky install && install-peers",
1010
"first-release": "npx standard-version --commit-all --tag-prefix v --first-release",
1111
"release": "npx standard-version --commit-all --tag-prefix v",
12-
"extract-latest-change-log": "node scripts/extractLatestChangeLog.js",
1312
"test": "jest --verbose --watchAll --config ./jest.config.js",
1413
"test:ci": "yarn test --ci --watchAll=false --runInBand --detectOpenHandles"
1514
},

scripts/extractLatestChangeLog.js

-16
This file was deleted.

0 commit comments

Comments
 (0)