Skip to content

Commit

Permalink
Merge pull request #2845 from nervosnetwork/rc/v0.110.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Oct 10, 2023
2 parents 371145b + a607900 commit 588a142
Show file tree
Hide file tree
Showing 666 changed files with 26,298 additions and 25,665 deletions.
2 changes: 1 addition & 1 deletion .ckb-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.110.0
v0.110.2
12 changes: 6 additions & 6 deletions .github/workflows/add-replied-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
steps:
- id: check-access
name: Check if the commenter is a collaborator
uses: actions/github-script@v4
uses: actions/github-script@v6
with:
script: |
try{
const response = await github.repos.checkCollaborator({
const response = await github.rest.repos.checkCollaborator({
owner: context.repo.owner,
repo: context.repo.repo,
username: context.payload.comment.user.login,
Expand All @@ -30,10 +30,10 @@ jobs:

- id: check-issue
name: Check if the comment is replied in an issue
uses: actions/github-script@v4
uses: actions/github-script@v6
with:
script: |
const response = await github.issues.get({
const response = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
Expand All @@ -45,10 +45,10 @@ jobs:
- id: add-label
name: Add 'replied' label
if: ${{ steps.check-access.outputs.result == 'true' && steps.check-issue.outputs.result == 'true' }}
uses: actions/github-script@v4
uses: actions/github-script@v6
with:
script: |
await github.issues.addLabels({
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/check-code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check Code Style

on:
push:
pull_request:

jobs:
default:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
cache: "yarn"

- name: Restore
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}

- name: Bootstrap
run: |
yarn
- name: Changed Files
id: changed-files
uses: tj-actions/changed-files@v37
with:
files: "packages/**/*.{js,cjs,mjs,jsx,ts,tsx,css,scss}"

- name: Prettier Check
if: steps.changed-files.outputs.any_changed == 'true'
run: |
yarn prettier --check ${{ steps.changed-files.outputs.all_changed_files }}
12 changes: 12 additions & 0 deletions .github/workflows/check-spell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Check spell
on:
- pull_request
- push

jobs:
run:
name: Check spell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: crate-ci/typos@master
66 changes: 66 additions & 0 deletions .github/workflows/check_storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Check storybook

on:
push:
pull_request:

jobs:
default:
strategy:
matrix:
node:
- 18.12.0
os:
- macos-latest
- ubuntu-20.04
- windows-latest

runs-on: ${{ matrix.os }}

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

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "yarn"

- name: Restore
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: 2022-10-11-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev
- name: Install Lerna
run: yarn global add lerna

- name: Bootstrap
run: |
yarn
yarn build
env:
CI: false

- name: Build storybook
run: |
cd packages/neuron-ui
yarn build-storybook
env:
CI: true
11 changes: 6 additions & 5 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- master
- 'rc/**'
- 'hotfix/**'
- "rc/**"
- "hotfix/**"

jobs:
default:
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "yarn"

- name: Restore
uses: actions/cache@v3
Expand All @@ -49,7 +49,7 @@ jobs:
if: matrix.os == 'windows-2019'
uses: microsoft/setup-msbuild@v1.3.1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Install Lerna
run: yarn global add lerna

- name: Boostrap
- name: Bootstrap
run: |
yarn
env:
Expand All @@ -77,6 +77,7 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
TEAM_ID: ${{ secrets.TEAM_ID }}

- name: Package for Windows
if: matrix.os == 'windows-2019'
Expand Down
80 changes: 71 additions & 9 deletions .github/workflows/package_for_test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Package Neuron for Test

on: [push]
on:
issue_comment:
types: [created, edited]
push:

jobs:
packaging:
if: ${{ (github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/package')) || github.event_name == 'push' }}

strategy:
matrix:
node:
Expand All @@ -17,20 +22,31 @@ jobs:

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

env:
MAC_SHOULD_CODE_SIGN: ${{ github.event_name != 'pull_request' && secrets.APPLE_ID != '' }}
WIN_CERTIFICATE_BASE64: ${{ secrets.WIN_CERTIFICATE_BASE64 }}

steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
- name: Checkout for push
uses: actions/checkout@v3
if: ${{ github.event_name == 'push' }}

- name: Checkout for PR
uses: actions/checkout@v3
if: ${{ github.event_name == 'issue_comment' }}
with:
ref: refs/pull/${{ github.event.issue.number }}/merge

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache: "yarn"

- name: Restore
uses: actions/cache@v3
Expand All @@ -44,7 +60,7 @@ jobs:
if: matrix.os == 'windows-2019'
uses: microsoft/setup-msbuild@v1.3.1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
Expand All @@ -55,14 +71,14 @@ jobs:
- name: Install Lerna
run: yarn global add lerna

- name: Boostrap
- name: Bootstrap
run: |
yarn
env:
CI: false

- name: Package for MacOS
if: matrix.os == 'macos-latest'
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'true' }}
run: |
./scripts/download-ckb.sh mac
yarn package:test mac
Expand All @@ -72,9 +88,20 @@ jobs:
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CSC_LINK: ${{ secrets.MAC_CERTIFICATE_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }}
TEAM_ID: ${{ secrets.TEAM_ID }}

- name: Package for MacOS for skip code sign
if: ${{ matrix.os == 'macos-latest' && env.MAC_SHOULD_CODE_SIGN == 'false' }}
run: |
export CSC_IDENTITY_AUTO_DISCOVERY=false
./scripts/download-ckb.sh mac
yarn package:test mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_NOTARIZE: true

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

- name: Package for Windows for skip code sign
if: ${{ matrix.os == 'windows-2019' && env.WIN_CERTIFICATE_BASE64 == '' }}
run: |
bash ./scripts/download-ckb.sh win
yarn build
bash ./scripts/copy-ui-files.sh
bash ./scripts/package-for-test.sh win
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Package for Linux
if: matrix.os == 'ubuntu-20.04'
run: |
Expand Down Expand Up @@ -135,12 +172,37 @@ jobs:
name: Neuron-Linux
path: release/Neuron-*.AppImage

comment:
comment_when_package_success:
needs: [packaging]
name: Append links to the Pull Request
runs-on: ubuntu-latest
steps:
- uses: peter-evans/commit-comment@v2
- name: Comment by push event
if: ${{ github.event_name == 'push' }}
uses: peter-evans/commit-comment@v2
with:
body: |
Packaging for test is done in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
- name: Comment by pull request comment event
if: ${{ github.event_name == 'issue_comment' }}
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
body: |
Packaging for test is done in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). @${{ github.event.comment.user.login }}
edit-mode: append

comment_when_package_failed:
needs: [packaging]
if: ${{ always() && needs.packaging.result == 'failure' }}
name: Append failed comment to the comment
runs-on: ubuntu-latest
steps:
- name: Comment by pull request comment event when package failed
if: ${{ github.event_name == 'issue_comment' }}
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
body: Packageing failed in [${{ github.run_id }}](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). @${{ github.event.comment.user.login }}
edit-mode: append
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
path: |
node_modules
*/*/node_modules
key: 2022-05-07-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}
key: 2022-10-11-${{ runner.os }}-${{ hashFiles('**/yarn.lock')}}

- name: Install libudev
if: matrix.os == 'ubuntu-20.04'
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Install Lerna
run: yarn global add lerna

- name: Boostrap
- name: Bootstrap
run: |
yarn
yarn build
Expand Down
Loading

3 comments on commit 588a142

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6466106439

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'
'### Downloads'
''
'OS | Arch | Package | SHA256 Checksum'
'-- | -- | -- | --'
'Windows | x64 | exe | ad151b85c7c6a5809e117ef6048b921f3145365bfe23915aac38a281e2ab655e'
'macOS | x64 | zip | bb07276af1dfe69a6bd2d5a6024a9f6f29cc92d6bca14f5df50459ffd27acab0'
'macOS | arm64 | zip | 0e31e90584bd168fd380e2069e87bdf8be6ff76d03000e56da64e432d41f9772'
'macOS | x64 | DMG | 041ed9b2433b36c5ef3b877c2af9e8a88312e854e7806fde53141aa5704dcaca'
'macOS | arm64 | DMG | c24f61d30791c7a7be6fa22b9bc0e9a4d2ecec38c400330919188882d1673778'
'Linux | x64 | AppImage | e343927ccfa3daa0ae3b80e3bde7780ba22f4641d546e6686c6f27fdef8f1034

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 6476114808

Please sign in to comment.