Skip to content

Commit 12ab5d1

Browse files
authored
feat: split sdk code and use packages (#14)
* feat: split sdk from demo code * chore: bump v0.1.0-rc1 * fix(ci): publish pnpm version
1 parent 10738b4 commit 12ab5d1

Some content is hidden

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

61 files changed

+11629
-13000
lines changed

.github/workflows/node.js.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Test the functionality of the rgbpp-sdk packages.
2+
3+
name: Node.js
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
12+
jobs:
13+
nodejs:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Project
17+
uses: actions/checkout@v4
18+
19+
- name: Install Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20.x
23+
24+
- uses: pnpm/action-setup@v4
25+
name: Install -g pnpm
26+
with:
27+
version: 9
28+
run_install: false
29+
30+
- name: Get pnpm store directory
31+
shell: bash
32+
run: |
33+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
34+
35+
- uses: actions/cache@v4
36+
name: Setup pnpm cache
37+
with:
38+
path: ${{ env.STORE_PATH }}
39+
key: ${{ runner.os }}-pnpm-store-path-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
restore-keys: |
41+
${{ runner.os }}-pnpm-store-
42+
43+
- name: Install dependencies
44+
run: pnpm i
45+
46+
- name: Build packages
47+
run: pnpm -r run build
48+
49+
- name: Lint packages
50+
run: pnpm -r run lint
51+
52+
- name: Lint packages
53+
run: pnpm -r run fmt
54+
55+
- name: Tests packages
56+
run: pnpm -r run test
57+
58+
- run: git diff --exit-code

.github/workflows/publish.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish SDK on Tag
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
tags: ["v*.*.*"]
7+
8+
jobs:
9+
build-and-publish:
10+
if: startsWith(github.ref, 'refs/tags/')
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
22+
- uses: pnpm/action-setup@v4
23+
name: Install -g pnpm
24+
with:
25+
version: 9
26+
run_install: false
27+
28+
- name: Get pnpm store directory
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
32+
33+
- uses: actions/cache@v4
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ env.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-path-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
run: pnpm i
43+
44+
- name: Build
45+
run: pnpm -r --filter sdk run build
46+
47+
# Setup .npmrc file to publish to npm
48+
- name: Publish to npm
49+
env:
50+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
51+
run: pnpm -r --filter sdk publish --access public

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/tests/target
55
node_modules
66
.DS_Store
7-
llvm.sh
7+
llvm.sh
8+
dist

app/nostr-mint/app/conmponents/expandable.tsx

Lines changed: 0 additions & 28 deletions
This file was deleted.

app/nostr-mint/app/conmponents/unlock-button.tsx

Lines changed: 0 additions & 76 deletions
This file was deleted.

app/nostr-mint/app/protocol/ckb-helper.client.ts

Lines changed: 0 additions & 130 deletions
This file was deleted.

app/nostr-mint/app/protocol/content.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)