Skip to content

Commit 2b879cd

Browse files
authored
Publish npm packages when releasing new versions (#225)
1 parent 1972339 commit 2b879cd

File tree

4 files changed

+35
-15
lines changed

4 files changed

+35
-15
lines changed

.github/workflows/release.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,27 @@ env:
88
RUST_TOOLCHAIN: 1.85.0
99
permissions:
1010
contents: write
11+
id-token: write
1112
jobs:
13+
release-npm:
14+
name: Build & Release ckb-light-client-js
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout the Repository
18+
uses: actions/checkout@v4
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: '20.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
- run: |
24+
npm install
25+
- run: |
26+
npm run build -ws
27+
- run: |
28+
cd wasm/light-client-js
29+
npm publish --provenance --access public
30+
env:
31+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1232
release:
1333
name: Build & Release
1434
runs-on: ${{ matrix.os }}

Cargo.lock

Lines changed: 11 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wasm/light-client-js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Web version of CKB LightClient, provide full APIs of CKB LightClient in browser.
66

77
### Install this package
88
```
9-
npm install ckb-light-client-js
9+
npm install @nervosnetwork/ckb-light-client-js
1010
```
1111
### A piece of code
1212
```js

wasm/light-client-js/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"name": "ckb-light-client-js",
3-
"version": "1.0.4",
2+
"name": "@nervosnetwork/ckb-light-client-js",
3+
"repository": "https://github.com/nervosnetwork/ckb-light-client",
4+
"version": "0.5.0",
45
"main": "dist/index.js",
56
"license": "MIT",
67
"devDependencies": {

0 commit comments

Comments
 (0)