File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 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 88 "directories" : {
99 "test" : " test"
1010 },
11+ "files" : [" dist" ],
1112 "scripts" : {
1213 "build" : " tsc" ,
1314 "format" : " prettier --write '**/*.ts'" ,
1415 "lint" : " eslint --fix src/**/*.ts" ,
1516 "package" : " ncc build --source-map --license licenses.txt" ,
17+ "prepack" : " npm run build && npm run package" ,
1618 "test" : " jest src" ,
1719 "test:watch" : " jest --watch src" ,
1820 "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