Skip to content

Commit 93e5db1

Browse files
committed
add npm action
1 parent dd76ff1 commit 93e5db1

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.github/workflows/jsr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish
1+
name: Publish JSR
22
on:
33
push:
44
branches:

.github/workflows/npm.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish NPM
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
id-token: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: '22.x'
21+
registry-url: 'https://registry.npmjs.org'
22+
- run: npm publish --provenance --access public
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"types": "src/types.ts",
2020
"files": [
2121
"src",
22-
"mod.ts"
22+
"mod.ts",
23+
"package.json",
24+
"LICENSE",
25+
"README.md"
2326
]
2427
}

0 commit comments

Comments
 (0)