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 and Create GitHub Release
1+ name : Publish to npm
22
33on :
44 push :
5- branches :
6- - main
5+ branches : main
76
87jobs :
98 publish :
109 runs-on : ubuntu-latest
11-
1210 steps :
13- - name : Checkout repository
14- uses : actions/checkout@v2
15-
16- - name : Setup Node.js
17- uses : actions/setup-node@v2
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-node@v3
1813 with :
19- node-version : ' 18'
20- registry-url : ' https://registry.npmjs.org'
21-
22- - name : Install dependencies
23- run : npm ci
24-
25- - name : Publish to npm
26- run : npm publish --provenance --access public
27- env :
28- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
29-
30- - name : Get version from package.json
31- id : get_version
32- run : echo "::set-output name=VERSION::$(node -p -e "require('./package.json').version")"
33-
34- - name : Create GitHub Release
35- id : create_release
36- uses : actions/create-release@v1
37- env :
38- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14+ node-version : " 18"
15+ - run : npm ci
16+ - run : npm test
17+ - uses : JS-DevTools/npm-publish@v3
3918 with :
40- tag_name : v${{ steps.get_version.outputs.VERSION }}
41- release_name : Release ${{ steps.get_version.outputs.VERSION }}
42- body : |
43- ## Changes
44- - Describe your changes here
45- draft : false
46- prerelease : false
19+ token : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 44 "description" : " Command AI" ,
55 "main" : " ai.js" ,
66 "type" : " module" ,
7+ "repository" : {
8+ "type" : " git" ,
9+ "url" : " https://github.com/CommandAI/ai-cli"
10+ },
711 "bin" : {
812 "ai" : " ./ai.js" ,
913 "ai!" : " ./ai!.js" ,
You can’t perform that action at this time.
0 commit comments