Skip to content

Commit 3bb1486

Browse files
committed
Add JavaScript publishing
1 parent 88d3cc1 commit 3bb1486

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

.github/workflows/publish.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ jobs:
2828
publish-crates:
2929
needs: check
3030

31-
permissions: write-all
31+
permissions:
32+
contents: write
33+
id-token: write
3234

3335
strategy: { matrix: { project: [frame-protocol] } }
3436

@@ -39,15 +41,19 @@ jobs:
3941
uses: actions/checkout@v4
4042
- uses: dtolnay/rust-toolchain@stable
4143

42-
# - uses: rust-lang/crates-io-auth-action@v1
43-
# id: auth
44+
- uses: rust-lang/crates-io-auth-action@v1
45+
id: auth
4446

4547
- uses: kaleidawave/crates-release-gh-action@improvements
4648
id: release
4749
with:
4850
working-directory: ${{ matrix.project }}
49-
crates-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
51+
crates-token: ${{ steps.auth.outputs.token }}
5052
version: patch
53+
54+
- name: Update JavaScript library
55+
working-directory: ${{ matrix.project }}/javascript
56+
run: npx jsr publish
5157

5258
- name: Push updated Cargo.toml
5359
run: |

frame-protocol/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ license = "MIT"
99
keywords = ["encoding", "message", "stdin-stdout", "iterator", "protocol"]
1010
categories = ["encoding", "network-programming", "text-processing"]
1111

12+
metadata.version_sync = ["javascript/deno.json"]
13+
1214
[lib]
1315
path = "lib.rs"
1416

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"name": "@bengineering/frame-protocol",
3+
"version": "0.0.1",
4+
"license": "MIT",
5+
"exports": "./index.ts"
6+
}

0 commit comments

Comments
 (0)