File tree Expand file tree Collapse file tree 5 files changed +49
-39
lines changed Expand file tree Collapse file tree 5 files changed +49
-39
lines changed Original file line number Diff line number Diff line change 12
12
deno-version : v1.x
13
13
- name : Run tests
14
14
run : deno test
15
+
16
+ - name : Get tag version
17
+ if : startsWith(github.ref, 'refs/tags/')
18
+ id : get_tag_version
19
+ run : echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
20
+ - uses : actions/setup-node@v2
21
+ with :
22
+ node-version : ' 14.x'
23
+ registry-url : ' https://registry.npmjs.org'
24
+ - name : npm build
25
+ run : deno run --allow-read --allow-write=./npm --allow-net --allow-run --no-check ./scripts/build_npm.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
26
+ - name : npm publish
27
+ if : startsWith(github.ref, 'refs/tags/')
28
+ env :
29
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
30
+ run : |
31
+ cd npm
32
+ npm publish
Original file line number Diff line number Diff line change 1
1
/node_modules
2
2
* .js.map
3
- npm /dist
4
- npm /LICENSE
3
+ npm
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { build } from "https://deno.land/x/[email protected] /mod.ts" ;
2
+
3
+ await build ( {
4
+ entryPoint : "mod.ts" ,
5
+ typeCheck : true ,
6
+ outDir : "./npm" ,
7
+ package : {
8
+ name : "code-block-writer" ,
9
+ version : Deno . args [ 0 ] ?? "0.0.0" ,
10
+ description : "A simple code writer that assists with formatting and visualizing blocks of code." ,
11
+ repository : {
12
+ type : "git" ,
13
+ url : "git+https://github.com/dsherret/code-block-writer.git" ,
14
+ } ,
15
+ keywords : [
16
+ "code generation" ,
17
+ "typescript" ,
18
+ "writer" ,
19
+ "printer" ,
20
+ ] ,
21
+ author : "David Sherret" ,
22
+ license : "MIT" ,
23
+ bugs : {
24
+ url : "https://github.com/dsherret/code-block-writer/issues" ,
25
+ } ,
26
+ homepage : "https://github.com/dsherret/code-block-writer#readme" ,
27
+ } ,
28
+ } ) ;
29
+
30
+ Deno . copyFileSync ( "LICENSE" , "npm/LICENSE" ) ;
You can’t perform that action at this time.
0 commit comments