File tree 2 files changed +28
-0
lines changed
2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ jobs :
8
+ publish-npm :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout the project
12
+ uses : actions/checkout@v3
13
+ - name : Use Node.js 16.x (LTS)
14
+ uses : actions/setup-node@v3
15
+ with :
16
+ node-version : 16.x
17
+ registry-url : https://registry.npmjs.org/
18
+ cache : npm
19
+ - run : npm ci
20
+ - run : npm test
21
+ - run : npm version ${TAG_NAME} --git-tag-version=false
22
+ env :
23
+ TAG_NAME : ${{ github.event.release.tag_name }}
24
+ - run : npm whoami; npm publish
25
+ env :
26
+ NODE_AUTH_TOKEN : ${{secrets.npm_token}}
Original file line number Diff line number Diff line change 8
8
"directories" : {
9
9
"test" : " test"
10
10
},
11
+ "files" : [" dist" ],
11
12
"scripts" : {
12
13
"build" : " tsc" ,
13
14
"format" : " prettier --write '**/*.ts'" ,
14
15
"lint" : " eslint --fix src/**/*.ts" ,
15
16
"package" : " ncc build --source-map --license licenses.txt" ,
17
+ "prepack" : " npm run build && npm run package" ,
16
18
"test" : " jest src" ,
17
19
"test:watch" : " jest --watch src" ,
18
20
"all" : " npm run build && npm run format && npm run lint && npm run test && npm run package && npm run all:example" ,
You can’t perform that action at this time.
0 commit comments