Skip to content

Commit f0ec429

Browse files
ci: add JSR publishing
1 parent 081564b commit f0ec429

3 files changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ jobs:
2323
- run: bun install --frozen-lockfile
2424
- run: bun run build
2525
- run: npm publish --provenance --access public
26+
27+
jsr:
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
id-token: write
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 24
37+
- run: npx jsr publish --allow-slow-types

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,16 @@ bun run build
6464

6565
Publishing runs from GitHub releases through `.github/workflows/publish.yml`.
6666

67-
The workflow uses npm provenance and GitHub's OpenID Connect token. Before the first release, configure npm trusted publishing for `@enderdash/client` with:
67+
The workflow publishes to npm and JSR with GitHub OpenID Connect tokens.
68+
69+
Before the first npm release, configure npm trusted publishing for `@enderdash/client` with:
6870

6971
- owner: `enderdash-com`
7072
- repository: `enderdash-client`
7173
- workflow: `publish.yml`
7274

75+
Before the first JSR release, create or open `@enderdash/client` on JSR, then link it to:
76+
77+
- repository: `enderdash-com/enderdash-client`
78+
7379
Then publish by creating a GitHub release for the version in `package.json`.

jsr.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://jsr.io/schema/config-file.v1.json",
3+
"name": "@enderdash/client",
4+
"version": "0.1.1",
5+
"license": "MIT",
6+
"exports": "./src/index.ts",
7+
"publish": {
8+
"include": [
9+
"LICENSE",
10+
"README.md",
11+
"src/**/*.ts"
12+
]
13+
}
14+
}

0 commit comments

Comments
 (0)