File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on : push
4+
5+ jobs :
6+ build-and-publish :
7+ name : Build and publish to npm
8+ if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@v4
14+
15+ - name : Set up Node.js
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : " 20"
19+ registry-url : " https://registry.npmjs.org"
20+
21+ - name : Install dependencies
22+ run : npm ci
23+
24+ - name : Run tests (build)
25+ run : npm test
26+
27+ - name : Publish to npm
28+ env :
29+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
30+ run : npm publish --access public
Original file line number Diff line number Diff line change 5757 ],
5858 "scripts" : {
5959 "build" : " tsc && node ./dist/index.js" ,
60+ "test" : " npm run build" ,
6061 "jsdoc" : " jsdoc" ,
6162 "docgen" : " tsc && yarn jsdoc ./dist -R \" ./readme.md\" -P \" ./package.json\" -t \" ./node_modules/jaguarjs-jsdoc\" -d \" ./docs\" -r" ,
6263 "example" : " tsc && node ./tests/mtCaptcha.js"
You can’t perform that action at this time.
0 commit comments