File tree Expand file tree Collapse file tree 5 files changed +111
-4
lines changed
Expand file tree Collapse file tree 5 files changed +111
-4
lines changed Original file line number Diff line number Diff line change 55 - main
66
77jobs :
8- publish :
8+ jsr :
99 runs-on : ubuntu-latest
1010 permissions :
1111 contents : read
1818 deno-version : vx.x.x
1919 - name : Publish package
2020 run : deno publish
21+ npm :
22+ runs-on : ubuntu-latest
23+ permissions :
24+ contents : read
25+ id-token : write
26+ steps :
27+ - uses : actions/checkout@v4
28+ - name : Setup Deno
29+ uses : denoland/setup-deno@v2
30+ with :
31+ deno-version : vx.x.x
32+ - name : setup Node
33+ uses : actions/setup-node@v4
34+ with :
35+ registry-url : " https://registry.npmjs.org"
36+ - name : Build npm package
37+ run : deno run -A scripts/build_npm.ts
38+
39+ - name : Publish package
40+ run : npm publish --provenance --access public
41+ working-directory : ./npm
42+ env :
43+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1+ npm /
Original file line number Diff line number Diff line change 11{
22 "name" : " @rotu/structview" ,
3- "version" : " 0.6.1 " ,
3+ "version" : " 0.7.0 " ,
44 "license" : " MIT" ,
55 "tasks" : {
66 "dev" : " deno test --watch"
99 "semiColons" : false
1010 },
1111 "imports" : {
12+ "@deno/dnt" : " jsr:@deno/dnt@^0.42.3" ,
1213 "@std/assert" : " jsr:@std/assert@1"
1314 },
1415 "exports" : {
Original file line number Diff line number Diff line change 1+ import { build , emptyDir } from "@deno/dnt"
2+
3+ import denojson from "../deno.json" with { type : "json" }
4+
5+ await emptyDir ( "./npm" )
6+
7+ await build ( {
8+ typeCheck : false ,
9+ scriptModule : false ,
10+ entryPoints : [ "./mod.ts" ] ,
11+ outDir : "./npm" ,
12+ shims : {
13+ deno : "dev" ,
14+ } ,
15+ package : {
16+ name : "@rotu/structview" ,
17+ version : `${ denojson . version } +dnt` ,
18+ repository : {
19+ type : "git" ,
20+ url : "https://github.com/rotu/structview" ,
21+ } ,
22+ description : "Read and write structured binary data with typesafe views" ,
23+ license : "MIT" ,
24+ } ,
25+ postBuild ( ) {
26+ // steps to run after building and before running the tests
27+ Deno . copyFileSync ( "README.md" , "npm/README.md" )
28+ } ,
29+ } )
You can’t perform that action at this time.
0 commit comments