Skip to content

Commit 588a142

Browse files
authored
Merge pull request nervosnetwork#2845 from nervosnetwork/rc/v0.110.3
2 parents 371145b + a607900 commit 588a142

File tree

666 files changed

+26298
-25665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

666 files changed

+26298
-25665
lines changed

.ckb-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.110.0
1+
v0.110.2

.github/workflows/add-replied-label.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
steps:
1313
- id: check-access
1414
name: Check if the commenter is a collaborator
15-
uses: actions/github-script@v4
15+
uses: actions/github-script@v6
1616
with:
1717
script: |
1818
try{
19-
const response = await github.repos.checkCollaborator({
19+
const response = await github.rest.repos.checkCollaborator({
2020
owner: context.repo.owner,
2121
repo: context.repo.repo,
2222
username: context.payload.comment.user.login,
@@ -30,10 +30,10 @@ jobs:
3030

3131
- id: check-issue
3232
name: Check if the comment is replied in an issue
33-
uses: actions/github-script@v4
33+
uses: actions/github-script@v6
3434
with:
3535
script: |
36-
const response = await github.issues.get({
36+
const response = await github.rest.issues.get({
3737
owner: context.repo.owner,
3838
repo: context.repo.repo,
3939
issue_number: context.issue.number,
@@ -45,10 +45,10 @@ jobs:
4545
- id: add-label
4646
name: Add 'replied' label
4747
if: ${{ steps.check-access.outputs.result == 'true' && steps.check-issue.outputs.result == 'true' }}
48-
uses: actions/github-script@v4
48+
uses: actions/github-script@v6
4949
with:
5050
script: |
51-
await github.issues.addLabels({
51+
await github.rest.issues.addLabels({
5252
owner: context.repo.owner,
5353
repo: context.repo.repo,
5454
issue_number: context.issue.number,
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Check Code Style
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
default:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v3
17+
with:
18+
cache: "yarn"
19+
20+
- name: Restore
21+
uses: actions/cache@v3
22+
with:
23+
path: |
24+
node_modules
25+
*/*/node_modules
26+
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
27+
28+
- name: Bootstrap
29+
run: |
30+
yarn
31+
32+
- name: Changed Files
33+
id: changed-files
34+
uses: tj-actions/changed-files@v37
35+
with:
36+
files: "packages/**/*.{js,cjs,mjs,jsx,ts,tsx,css,scss}"
37+
38+
- name: Prettier Check
39+
if: steps.changed-files.outputs.any_changed == 'true'
40+
run: |
41+
yarn prettier --check ${{ steps.changed-files.outputs.all_changed_files }}

.github/workflows/check-spell.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Check spell
2+
on:
3+
- pull_request
4+
- push
5+
6+
jobs:
7+
run:
8+
name: Check spell
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: crate-ci/typos@master
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Check storybook
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
default:
9+
strategy:
10+
matrix:
11+
node:
12+
- 18.12.0
13+
os:
14+
- macos-latest
15+
- ubuntu-20.04
16+
- windows-latest
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
name: ${{ matrix.os }}(Node.js ${{ matrix.node }})
21+
22+
steps:
23+
- name: Set git to use LF
24+
run: |
25+
git config --global core.autocrlf false
26+
git config --global core.eol lf
27+
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: ${{ matrix.node }}
35+
cache: "yarn"
36+
37+
- name: Restore
38+
uses: actions/cache@v3
39+
with:
40+
path: |
41+
node_modules
42+
*/*/node_modules
43+
key: 2022-10-11-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
44+
45+
- name: Install libudev
46+
if: matrix.os == 'ubuntu-20.04'
47+
run: |
48+
sudo apt-get update
49+
sudo apt-get install -y libudev-dev
50+
51+
- name: Install Lerna
52+
run: yarn global add lerna
53+
54+
- name: Bootstrap
55+
run: |
56+
yarn
57+
yarn build
58+
env:
59+
CI: false
60+
61+
- name: Build storybook
62+
run: |
63+
cd packages/neuron-ui
64+
yarn build-storybook
65+
env:
66+
CI: true

.github/workflows/package.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55
branches:
66
- master
7-
- 'rc/**'
8-
- 'hotfix/**'
7+
- "rc/**"
8+
- "hotfix/**"
99

1010
jobs:
1111
default:
@@ -35,7 +35,7 @@ jobs:
3535
uses: actions/setup-node@v3
3636
with:
3737
node-version: ${{ matrix.node }}
38-
cache: 'yarn'
38+
cache: "yarn"
3939

4040
- name: Restore
4141
uses: actions/cache@v3
@@ -49,7 +49,7 @@ jobs:
4949
if: matrix.os == 'windows-2019'
5050
uses: microsoft/[email protected]
5151
env:
52-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
52+
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
5353

5454
- name: Install libudev
5555
if: matrix.os == 'ubuntu-20.04'
@@ -60,7 +60,7 @@ jobs:
6060
- name: Install Lerna
6161
run: yarn global add lerna
6262

63-
- name: Boostrap
63+
- name: Bootstrap
6464
run: |
6565
yarn
6666
env:
@@ -77,6 +77,7 @@ jobs:
7777
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
7878
CSC_LINK: ${{ secrets.MAC_CERTIFICATE_BASE64 }}
7979
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
80+
TEAM_ID: ${{ secrets.TEAM_ID }}
8081

8182
- name: Package for Windows
8283
if: matrix.os == 'windows-2019'

.github/workflows/package_for_test.yml

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
name: Package Neuron for Test
22

3-
on: [push]
3+
on:
4+
issue_comment:
5+
types: [created, edited]
6+
push:
47

58
jobs:
69
packaging:
10+
if: ${{ (github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/package')) || github.event_name == 'push' }}
11+
712
strategy:
813
matrix:
914
node:
@@ -17,20 +22,31 @@ jobs:
1722

1823
name: ${{ matrix.os }}(Node.js ${{ matrix.node }})
1924

25+
env:
26+
MAC_SHOULD_CODE_SIGN: ${{ github.event_name != 'pull_request' && secrets.APPLE_ID != '' }}
27+
WIN_CERTIFICATE_BASE64: ${{ secrets.WIN_CERTIFICATE_BASE64 }}
28+
2029
steps:
2130
- name: Set git to use LF
2231
run: |
2332
git config --global core.autocrlf false
2433
git config --global core.eol lf
2534
26-
- name: Checkout
35+
- name: Checkout for push
36+
uses: actions/checkout@v3
37+
if: ${{ github.event_name == 'push' }}
38+
39+
- name: Checkout for PR
2740
uses: actions/checkout@v3
41+
if: ${{ github.event_name == 'issue_comment' }}
42+
with:
43+
ref: refs/pull/${{ github.event.issue.number }}/merge
2844

2945
- name: Setup Node
3046
uses: actions/setup-node@v3
3147
with:
3248
node-version: ${{ matrix.node }}
33-
cache: 'yarn'
49+
cache: "yarn"
3450

3551
- name: Restore
3652
uses: actions/cache@v3
@@ -44,7 +60,7 @@ jobs:
4460
if: matrix.os == 'windows-2019'
4561
uses: microsoft/[email protected]
4662
env:
47-
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
63+
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
4864

4965
- name: Install libudev
5066
if: matrix.os == 'ubuntu-20.04'
@@ -55,14 +71,14 @@ jobs:
5571
- name: Install Lerna
5672
run: yarn global add lerna
5773

58-
- name: Boostrap
74+
- name: Bootstrap
5975
run: |
6076
yarn
6177
env:
6278
CI: false
6379

6480
- name: Package for MacOS
65-
if: matrix.os == 'macos-latest'
81+
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'true' }}
6682
run: |
6783
./scripts/download-ckb.sh mac
6884
yarn package:test mac
@@ -72,9 +88,20 @@ jobs:
7288
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
7389
CSC_LINK: ${{ secrets.MAC_CERTIFICATE_BASE64 }}
7490
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
91+
TEAM_ID: ${{ secrets.TEAM_ID }}
92+
93+
- name: Package for MacOS for skip code sign
94+
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'false' }}
95+
run: |
96+
export CSC_IDENTITY_AUTO_DISCOVERY=false
97+
./scripts/download-ckb.sh mac
98+
yarn package:test mac
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
SKIP_NOTARIZE: true
75102

76103
- name: Package for Windows
77-
if: matrix.os == 'windows-2019'
104+
if: ${{ matrix.os == 'windows-2019' && env.WIN_CERTIFICATE_BASE64 != '' }}
78105
run: |
79106
bash ./scripts/download-ckb.sh win
80107
yarn build
@@ -85,6 +112,16 @@ jobs:
85112
CSC_LINK: ${{ secrets.WIN_CERTIFICATE_BASE64 }}
86113
CSC_KEY_PASSWORD: ${{ secrets.WIN_CERTIFICATE_PASSWORD }}
87114

115+
- name: Package for Windows for skip code sign
116+
if: ${{ matrix.os == 'windows-2019' && env.WIN_CERTIFICATE_BASE64 == '' }}
117+
run: |
118+
bash ./scripts/download-ckb.sh win
119+
yarn build
120+
bash ./scripts/copy-ui-files.sh
121+
bash ./scripts/package-for-test.sh win
122+
env:
123+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
88125
- name: Package for Linux
89126
if: matrix.os == 'ubuntu-20.04'
90127
run: |
@@ -135,12 +172,37 @@ jobs:
135172
name: Neuron-Linux
136173
path: release/Neuron-*.AppImage
137174

138-
comment:
175+
comment_when_package_success:
139176
needs: [packaging]
140177
name: Append links to the Pull Request
141178
runs-on: ubuntu-latest
142179
steps:
143-
- uses: peter-evans/commit-comment@v2
180+
- name: Comment by push event
181+
if: ${{ github.event_name == 'push' }}
182+
uses: peter-evans/commit-comment@v2
144183
with:
145184
body: |
146185
Packaging for test is done in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
186+
187+
- name: Comment by pull request comment event
188+
if: ${{ github.event_name == 'issue_comment' }}
189+
uses: peter-evans/create-or-update-comment@v3
190+
with:
191+
comment-id: ${{ github.event.comment.id }}
192+
body: |
193+
Packaging for test is done in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). @${{ github.event.comment.user.login }}
194+
edit-mode: append
195+
196+
comment_when_package_failed:
197+
needs: [packaging]
198+
if: ${{ always() && needs.packaging.result == 'failure' }}
199+
name: Append failed comment to the comment
200+
runs-on: ubuntu-latest
201+
steps:
202+
- name: Comment by pull request comment event when package failed
203+
if: ${{ github.event_name == 'issue_comment' }}
204+
uses: peter-evans/create-or-update-comment@v3
205+
with:
206+
comment-id: ${{ github.event.comment.id }}
207+
body: Packageing failed in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). @${{ github.event.comment.user.login }}
208+
edit-mode: append

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
path: |
4141
node_modules
4242
*/*/node_modules
43-
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
43+
key: 2022-10-11-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
4444

4545
- name: Install libudev
4646
if: matrix.os == 'ubuntu-20.04'
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install Lerna
5252
run: yarn global add lerna
5353

54-
- name: Boostrap
54+
- name: Bootstrap
5555
run: |
5656
yarn
5757
yarn build

0 commit comments

Comments
 (0)