File tree Expand file tree Collapse file tree 1 file changed +17
-24
lines changed
Expand file tree Collapse file tree 1 file changed +17
-24
lines changed Original file line number Diff line number Diff line change 11name : NPM Publish
22on :
3- push :
4- branches :
5- - main
3+ release :
4+ types : [published]
65
76jobs :
8- publish-gpr :
7+ publish :
98 runs-on : ubuntu-latest
109
1110 steps :
1211 - uses : actions/checkout@v4
1312
14- # Set Git user name and email
15- - name : Set Git user name and email
16- run : |
17- git config --global user.email "[email protected] " 18- git config --global user.name "itsfuad"
19-
20- - uses : actions/setup-node@v4
13+ - name : Set up Node.js
14+ uses : actions/setup-node@v4
2115 with :
22- node-version : 20
23- registry-url : https://npm.pkg.github.com/
24- scope : ' @itsfuad'
16+ node-version : ' 20.x'
17+ registry-url : ' https://registry.npmjs.org'
2518
26- - run : npm install
27- - run : npx tsc
19+ - name : Install dependencies by npm
20+ run : npm install
2821
29- # Run npm version to auto-increment the version number
30- - name : Auto-increment version number
31- run : npm version patch --force
32- env :
33- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
22+ - name : Run typescript to compile
23+ run : tsc
3424
35- # Publish the package with the updated version number
36- - run : npm publish
25+ - name : Publish to NPM
26+ run : npm publish --access public
3727 env :
38- NODE_AUTH_TOKEN : ${{secrets.GITHUB_TOKEN}}
28+ NODE_AUTH_TOKEN : ${{secrets.NPM_TOKEN}}
29+
30+
31+
You can’t perform that action at this time.
0 commit comments