File tree Expand file tree Collapse file tree 1 file changed +18
-21
lines changed
Expand file tree Collapse file tree 1 file changed +18
-21
lines changed Original file line number Diff line number Diff line change 44name : Node.js Package
55
66on :
7- workflow_dispatch :
8- release :
9- types : [created]
7+ push :
8+ branches :
9+ - main
1010
1111jobs :
1212 build :
1313 runs-on : ubuntu-latest
1414 steps :
15- - uses : actions/checkout@v4
16- - uses : actions/setup-node@v4
17- with :
18- node-version : 20
19- - run : npm ci
20- - run : npm publish
15+ - name : Checkout code
16+ uses : actions/checkout@v2
2117
22- publish-npm :
23- needs : build
24- runs-on : ubuntu-latest
25- steps :
26- - uses : actions/checkout@v4
27- - uses : actions/setup-node@v4
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v2
2820 with :
29- node-version : 20
30- registry-url : https://registry.npmjs.org/
31- - run : npm ci
32- - run : npm publish
33- env :
34- NODE_AUTH_TOKEN : ${{secrets.NPMTOKEN}}
21+ node-version : ' 19'
22+ registry-url : ' https://registry.npmjs.org/'
23+
24+ - name : Authenticate to npm
25+ run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPMTOKEN }}" > ~/.npmrc
26+
27+ - name : Install dependencies
28+ run : npm install
29+
30+ - name : Publish package
31+ run : npm publish
You can’t perform that action at this time.
0 commit comments