From 071256871813b73de1931e9016613321483ce11c Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 19:16:10 +0800 Subject: [PATCH 1/6] style: Add chains type declaration for dev example --- packages/walletkit/dev/chains.ts | 4 ++-- website/src/components/WalletKit/index.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/walletkit/dev/chains.ts b/packages/walletkit/dev/chains.ts index 8171bbe7..cbcbc3f1 100644 --- a/packages/walletkit/dev/chains.ts +++ b/packages/walletkit/dev/chains.ts @@ -1,6 +1,6 @@ -import { bsc, mainnet } from 'wagmi/chains'; +import { Chain, bsc, mainnet } from 'wagmi/chains'; -export const chains = [ +export const chains: Chain[] = [ { id: 204, name: 'opBNB Mainnet', diff --git a/website/src/components/WalletKit/index.tsx b/website/src/components/WalletKit/index.tsx index 1df5a012..5d7ba403 100644 --- a/website/src/components/WalletKit/index.tsx +++ b/website/src/components/WalletKit/index.tsx @@ -30,11 +30,11 @@ const config = createConfig( connectors: [ trustWallet(), metaMask(), - binanceWeb3Wallet(), - okxWallet(), - coinbaseWallet(), - mathWallet(), - tokenPocket(), + // binanceWeb3Wallet(), + // okxWallet(), + // coinbaseWallet(), + // mathWallet(), + // tokenPocket(), walletConnect(), ], }), From 5d859fc1dd36a18f2f6297e308b85757f55b472a Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 19:16:49 +0800 Subject: [PATCH 2/6] style: Add chains type declaration for dev example --- .changeset/moody-eels-compete.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/moody-eels-compete.md diff --git a/.changeset/moody-eels-compete.md b/.changeset/moody-eels-compete.md new file mode 100644 index 00000000..f5a44c9a --- /dev/null +++ b/.changeset/moody-eels-compete.md @@ -0,0 +1,5 @@ +--- +'@totejs/walletkit': patch +--- + +Add chains type declaration for dev example From c6020c7ba71575fe202cd1b8bf7f2ef0e0cdf91b Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 23:34:55 +0800 Subject: [PATCH 3/6] chore: test docs release workflow --- .github/actions/setup/action.yaml | 28 ++++++++++++++++++++++++++ .github/workflows/docs.yaml | 25 +++++++++++++++++++++++ .github/workflows/release.yaml | 33 ++++--------------------------- package.json | 5 ++++- website/package.json | 1 + 5 files changed, 62 insertions(+), 30 deletions(-) create mode 100644 .github/actions/setup/action.yaml create mode 100644 .github/workflows/docs.yaml diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml new file mode 100644 index 00000000..516ca41b --- /dev/null +++ b/.github/actions/setup/action.yaml @@ -0,0 +1,28 @@ +name: 'setup' +description: Prepare the environment + +runs: + using: composite + steps: + - name: Checkout code repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + id: pnpm-install + with: + version: 8 + run_install: false + + - name: Setup pnpm config + run: pnpm config set store-dir .pnpm-store + + - name: Install dependencies + run: pnpm install diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..dae55183 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,25 @@ +name: Deploy docs +on: + push: + branches: + - dev + +jobs: + release: + name: deploy docs + if: github.repository == 'node-real/walletkit' + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - uses: ./.github/actions/setup + + - name: Build docs + run: pnpm build:docs + + - name: Deploy docs + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./website/dist + branch: 'docs' + clean: true + force: true diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 391aa96e..74ce80ce 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,33 +5,17 @@ on: - main - 0.x -env: - CI: true - PNPM_CACHE_FOLDER: .pnpm-store - jobs: release: name: release if: github.repository == 'node-real/walletkit' - timeout-minutes: 15 + timeout-minutes: 10 runs-on: ubuntu-latest steps: - - name: Checkout code repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 + - uses: ./.github/actions/setup - - name: Setup node.js - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - id: pnpm-install - with: - version: 8 - run_install: false + - name: Build packages + run: pnpm build - name: Creating .npmrc run: | @@ -41,15 +25,6 @@ jobs: env: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Setup pnpm config - run: pnpm config set store-dir $PNPM_CACHE_FOLDER - - - name: Install dependencies - run: pnpm install - - - name: Build packages - run: pnpm --filter "@totejs/**" build - - name: Create and publish versions uses: changesets/action@v1 with: diff --git a/package.json b/package.json index eb808576..b4829f73 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,10 @@ "scripts": { "prepare": "husky install", "lint": "pnpm eslint .", - "dev": "pnpm --filter @totejs/walletkit dev", + "dev": "pnpm --F @totejs/walletkit dev", + "build": "pnpm --F @totejs/walletkit build", + "dev:docs": "pnpm --F @totejs/walletkit build:watch & pnpm --F website dev", + "build:docs": "pnpm --F @totejs/walletkit build && pnpm --F website build", "ci:version": "pnpm changeset version && pnpm install && cp README.md packages/walletkit/README.md", "ci:publish": "pnpm publish -r" }, diff --git a/website/package.json b/website/package.json index 910fc279..07514fb8 100644 --- a/website/package.json +++ b/website/package.json @@ -4,6 +4,7 @@ "author": "node-real", "private": true, "type": "module", + "homepage": "https://node-real.github.io/walletkit", "scripts": { "dev": "vite --host 0.0.0.0", "build": "tsc && vite build" From eeadb2a4460cc52708e082e298dbc427635d2e47 Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 23:42:02 +0800 Subject: [PATCH 4/6] chore: Test docs release workflow --- .github/actions/setup/action.yaml | 5 ----- .github/workflows/docs.yaml | 5 +++++ .github/workflows/release.yaml | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 516ca41b..49786bf3 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -4,11 +4,6 @@ description: Prepare the environment runs: using: composite steps: - - name: Checkout code repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Setup node.js uses: actions/setup-node@v3 with: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index dae55183..426c7895 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,6 +11,11 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-latest steps: + - name: Checkout code repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: ./.github/actions/setup - name: Build docs diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 74ce80ce..08ce21d3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,11 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-latest steps: + - name: Checkout code repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - uses: ./.github/actions/setup - name: Build packages From 0ae070ef6a01d38b22fa7f039b00acfc987a1146 Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 23:44:47 +0800 Subject: [PATCH 5/6] chore: test docs release workflow --- .github/actions/setup/action.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 49786bf3..21ab934a 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -12,12 +12,15 @@ runs: - name: Setup pnpm uses: pnpm/action-setup@v2 id: pnpm-install + shell: bash with: version: 8 run_install: false - name: Setup pnpm config + shell: bash run: pnpm config set store-dir .pnpm-store - name: Install dependencies + shell: bash run: pnpm install From 186fa0904f848489fddc9542e309b9ac8e599e3c Mon Sep 17 00:00:00 2001 From: Wenty Li Date: Mon, 27 Nov 2023 23:45:55 +0800 Subject: [PATCH 6/6] chore: test docs release workflow --- .github/actions/setup/action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup/action.yaml b/.github/actions/setup/action.yaml index 21ab934a..7b3a6999 100644 --- a/.github/actions/setup/action.yaml +++ b/.github/actions/setup/action.yaml @@ -12,7 +12,6 @@ runs: - name: Setup pnpm uses: pnpm/action-setup@v2 id: pnpm-install - shell: bash with: version: 8 run_install: false